[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sshfs and umask



Paul van der Vlis <paul@vandervlis.nl> wrote:

> I try to force the umask of an sshfs on the server side.

> I've tried /etc/ssh/sshd_config with for example:
> Subsystem       sftp    /usr/lib/openssh/sftp-server -u 0002
> or:
> ForceCommand internal-sftp -u 0002
> But this does not change the umask.

> And adding "session optional pam_umask.so umask=0002" to
> /etc/pam.d/sshd/ does change the umask for ssh, but not for sshfs.

> Does somebody understand where it goed wrong?

The umask can only enforce stricter permissions, i.e. the client wants
to set 0777 but the file gets set to 0775 in your case.

But it can't set wider permissions. If the client sets the permissions
to 0700 then no umask in the world will get you to 0775.

Dirty hack: use something like incron to trigger a script via inotify to
change the permssions.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: