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?

  • Please provide some more details. Post your vsftpd.conf for example. – wazoox Feb 21 '11 at 22:01
2

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.

  • I've tried that and it doesn't have any effect. Thanks though! I should have mentioned that I tried that. – Racertim Feb 21 '11 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 Mar 3 '11 at 18:52
  • Weird, are you using the same ftp client/parameters when uploading? – wazoox Mar 4 '11 at 17:29

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.