0

I know, another permissions question, but I couldn't find an answer...

I set up an sftp server with chrooted access by several users. The users have access to shared folders. On the shared folders I set the sgid bit so that every new subfolder in the shared folder is owned by the same group. Now some users (clients) seem to upload or create folders without write permissions for the group. That results in the problem that other users are unable to create another folder inside. How would I force the clients to create folders with certain permissions?

In the vsftpd.conf I can just do

chmod_enable=NO

which solves the problem for ftp, but for the sshd_config I can't find something similar. umask doesn't seem to help since this only restricts permissions.

PS: Ubuntu 16.04.1, OpenSSH-Server 1:7.2p2-4ubuntu1

1 Answer 1

1

sftp-server have option to deny this using -P switch. Modifying your sshd_config in server setting

Subsystem sftp internal-sftp -P setstat,fsetstat

should do the job.

3
  • hm, sounds right, but doesn't work yet. When I access the server with filezilla I can still change the permissions of folders. And yes, I did restart the service after I changed the sshd_config...
    – caligula
    Aug 12, 2016 at 14:19
  • Does it allow you to do that in the UI, or is the change actually applied to the server?
    – Jakuje
    Aug 12, 2016 at 14:24
  • It really changes it on the server. I checked it via ssh...
    – caligula
    Aug 12, 2016 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .