Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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'm by no means an expert, but I've checked the permissions and the ownership and it all seems to be the same. What am I missing?

PS - I'm sure I left out some relevant information. Please let me know what else I need to provide.

Thank you!

share|improve this question
Please provide some more details. Post your vsftpd.conf for example. – wazoox Feb 21 '11 at 22:01

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.

share|improve this answer
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 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.