Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have proftpd running under user proftpd. I have a new virtual server in ProFTP 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?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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."

http://proftpd.org/docs/directives/linked/config_ref_Umask.html

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.

share|improve this answer
    
I had to use Umask 002 002 make it work with both files and directories. –  ciastek 2 days ago
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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