I have proftpd running under user proftpd. I have a new virtual server in ProFTPD called "example.com" pointing to /var/www/example.com. I have chowned the /var/www/example.com folder with user "example_com" and group "www-data". I have set the directory as SGID (2775). This permits the FTP user "example_com" to login and upload files and folders, while permitting the Apache process user "www-data" to run the website and read/write to files.

In my proftpd.conf, I have set umask like so:

Umask 2664 2775

My trouble is this. When "example_com" creates a new file, it's setting it as 2644 instead of 2664. And when creating a new directory, it's setting it as 2755 instead of 2775. In both cases, it's missing the "group-writable" permission.

How do I turn on Group Write in ProFTPD globally?


According to the docs, you cannot set the SGID bit in the umask directive; it says: "Any arguments supplied must be an octal number, in the format 0xxx."


As joschi alludes to, what you really want is "Umask 0002" - a umask is bitwise to the object, not an absolute CHMOD setting. You only need to specify it once (not "umask 0002 0002") as the first will apply to all.

| improve this answer | |
  • I had to use Umask 002 002 make it work with both files and directories. – ciastek Jul 8 '14 at 14:59

This is nothing specific to ProFTPd, it's standard POSIX permissions "math".

You are mixing up the actual permissions on a file and the umask. See http://en.wikipedia.org/wiki/Umask for an introduction.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.