3

I have a server setup with Ubuntu, Apache2 and VSFTPD. We virtual host several sites on this machine. Typically, I use the same process to set up the new sites, but the default permissions for some are different than the others.

For some sites, I can upload new files and directories through FTP and they receive 644 and 755 permissions respectively. Just how I want them by default.

For other sites, they receive 0 or 600 as the default new file permission. I have to manually change each file to 644. This is slow and a pain to do.

I've checked the permissions and the ownership and it all seems to be the same. What am I missing?

1
  • Please provide some more details. Post your vsftpd.conf for example.
    – wazoox
    Commented Feb 21, 2011 at 22:01

1 Answer 1

3

What you're probably looking for is the "umask" parameter. If you're uploading files through vsftpd, the behaviour depends upon the way vsftpd is configured. If it is set up to use system users, you must modify the "local_umask" vsftpd parameter in the configuration file from the default 077 value to 022.

Don't forget to uncomment the line, too, and restart the vsftpd daemon.

3
  • I've tried that and it doesn't have any effect. Thanks though! I should have mentioned that I tried that.
    – Racertim
    Commented Feb 21, 2011 at 15:50
  • The umask is set to 022. The rest of the vsftpd.conf is unchanged. The reason why I am confused by this is because different sites act differently. I think I am doing something different in the setup/creation that is doing this.
    – Racertim
    Commented Mar 3, 2011 at 18:52
  • Weird, are you using the same ftp client/parameters when uploading?
    – wazoox
    Commented Mar 4, 2011 at 17:29

You must log in to answer this question.

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