On Tuesday 19 September 2006 13:53, Stefán István wrote:
> We have a file server, and there are a common directory for a
> group of a users. I set this common folder's permission to
> 2775 and that results that a newly created file or directory
> will have the same goup owner as the common dir. But the
> problem is, that if someone creates a file or a directory in
> this common folder, the permissions will be 644 or 755, and
> so the other users in the same group can't write that file or
> directory, only if the creator of the entry sets it manually
> to 664 or 775. 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 common dir is also shared with samba for the windows
> users, and in samba it is possible to set this.
Sorry, but it's not possible to do this with conventional Linux 
permissions or NFS. The permissions of a newly created file 
depend only on the hard-coded MODE (666 for files, 777 for 
directories) and the user's umask. So, either the users have to 
remember to set their umask, or use a different account with a 
correct umask to access that dir (you could try two accounts 
for each user with the same uid - it might work but I haven't 
tried it out myself), or have the user chmod each new file they 
make.

Thsi question came up on another list recently, and some 
workarounds I thought up were variations on using cron, find 
and chmod. Maybe there's some way you can hook fam and call a 
script each time a file is newly created.

But the easiest way is to simply export the filesystem in a way 
that does do what you want - samba. As long as the total number 
of connectiosn through samba for Linux and windows clients 
stays below some sane amount (I find 5-10 is usually about the 
maximum) the file server will cope ok.

alan

-- 
gentoo-user@gentoo.org mailing list

Reply via email to