Sorting out owner and group permissions...

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Tue Apr 21 15:02:45 UTC 2009


On Tuesday 21 April 2009 15:13:47 Mister Olli wrote:

> no does not work, since using SSH / SFTP does not involve starting a
> shell. so umask settings don't work.

Then you're using the wrong system for the task. The OS can't make assumptions 
about "what the ownership/modes of a file should really be, if an application 
is telling it they should be different".
This is why more mature FTP daemons allow modes/ownerships to be set on 
upload.

The OS already:
- gives a new file group of the containing directory so it is easy to create 
"shared files" in a "shared directory"
- has a default umask that is world readable
- allows changing a users umask

The application (sftp) overrides all this and now you're expecting the OS to 
override that again. Don't think so ;)
-- 
Mel


More information about the freebsd-questions mailing list