The Computer Oracle

How does local_umask and file_open_mode work?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2

--

Chapters
00:00 How Does Local_umask And File_open_mode Work?
00:25 Accepted Answer Score 18
00:52 Answer 2 Score 1
01:07 Thank you

--

Full question
https://superuser.com/questions/441515/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#permissions #vsftpd #umask

#avk47



ACCEPTED ANSWER

Score 18


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.




ANSWER 2

Score 1


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.