# Directory umask problem



## TimSparrow (Sep 29, 2010)

Hi!

I am new to system administration, so please be patient. I need to set up several user accounts, so that they belong to the same group and every file directory they create by default, can be equally accessed by any other member of the group, without relying on the user doing an explicit chmod. 

The users have ssh and sftp access.

I have done 2 changes:
1. in /etc/login.conf, I modified default umask to 0002
2. I made a shell wrapper to the sftp-server binary that sets umask to 0002 before calling the binary.

Problem description:
In ssh, all works perfectly, new files/dirs have perms as 0664/0775, as needed. However, in sftp mode, new directories do not have correct perms: 0755 instead of 0775. Files are uploaded correctly.

Where should I look for possible problems?


System: FreeBSD 8.0 stable
sftp: OpenSSH sftp-server running as a SubSystem configured in /etc/ssh/sshd_config


----------

