set default file permissions for a directory

Paul Lussier p.lussier at comcast.net
Fri Dec 9 13:55:01 EST 2005


Charles Farinella <cfarinella at appropriatesolutions.com> writes:

> Hi,
>
> I have a problem to solve, hopefully someone can help.  :-)
>
> I need all files in a specific directory to be created with group write
> permission (664) and all sub-directories 775.  I can set umask 002 in
> the individual accounts for group members, but they are all remote and
> just uploading files via WinSCP which means they aren't logged in or
> using the shell.
>
> I haven't so far been able to find out how to do this.

Set the appropriate permissions on the parent directory, then set the
sgid bit on it.  This will cause the children of the parent directory
to inherit the permissions of their parent:

  > chmod g+s foo

-- 

Seeya,
Paul



More information about the gnhlug-discuss mailing list