public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Stefán István" <stefi@geohidroterv.hu>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  Re: permissions for a common folder
Date: Wed, 20 Sep 2006 10:01:43 +0200	[thread overview]
Message-ID: <200609201001.43325.stefi@geohidroterv.hu> (raw)
In-Reply-To: <eeon20$q3o$1@sea.gmane.org>

kedd 19 szeptember 2006 14.15 dátummal Remy Blank ezt írta:
> Stefán István wrote:
> > Is there any way to tell 
> > the Linux to automatically set the rights to 664 or 775 in this common 
> > directory (and only in this)?
> 
> This is normally done by setting the umask to 002 instead of 022 for all
> users (in /etc/profile), and creating a separate primary group for every
> user with the same name as the user. Then all files and directories
> created by users will have 664 resp. 775 permissions. When creating
> files in "normal" directories, the files will have the "private" primary
> group of the user, and will therefore only be writable by the user. When
> creating files in directories with the SGID bit set, the group will be
> the same as the directory, and the file will be writable by all members
> of the group.
> 
> This is the default strategy in RedHat distributions (or at least it was
> when I switched to Gentoo, around 9.0 or so).
> 
> You might be able to get the same effect locally (i.e. only in your
> shared directory) by using POSIX ACLs. See 'man acl' for more info.

Okay, I think I have to use acl. I've read its documentation, and set up the 
following acl's:

setfacl -m d:u::rw /home/stefi/kepek/
setfacl -m d:g::rw /home/stefi/kepek/
setfacl -m d:o::r /home/stefi/kepek/

Now, if I create a file in this directory, it's permission will be 664 instead 
of the default 644. That's very good.
But if I create a directory it's permissons also will be 664. But I want it to 
be 775. How can I achive this?


Thanks,
Istvan

-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-09-20  8:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-19 11:53 [gentoo-user] permissions for a common folder Stefán István
2006-09-19 12:15 ` [gentoo-user] " Remy Blank
2006-09-20  8:01   ` Stefán István [this message]
2006-09-20  9:00     ` Remy Blank
2006-09-20 11:51       ` Stefán István
2006-09-20 12:52         ` Remy Blank
2006-09-19 12:23 ` [gentoo-user] " Alan McKinnon
2006-09-19 12:31 ` Matteo Pillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609201001.43325.stefi@geohidroterv.hu \
    --to=stefi@geohidroterv.hu \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox