Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 had some problems with the filepermissions when local users uploaded their files via vsftp to a server.

I wanted the files to have all 766 permissions. After a lot of trial and error I found out that I had to set the settings like this:


But I don't know why this results in 766 permissions. Can anyone explain this?

share|improve this question
up vote 7 down vote accepted

The vsftpd daemeon will create file permissions as 0777. From that, the local_umask ( 0011 ) is subtracted. The umask essentially removes the permissions you don't want users to have. This results in the user's file permissions to be set at 0766.

For more information, see this article about file permissions.

share|improve this answer
Yes I got that, I know the trick. But how does this work? Why can't I set just 766? – OrangeTux Jun 25 '12 at 22:37

The umask value is subtracted from the open mode setting. If you don't provide a custom umask value, the default one (077) is used, leading to a result you don't want.

share|improve this answer

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.