Set vsftp default file/folder create permission

19 Jul 2019

Open the vsftpd.conf file.

sudo vim /etc/vsftpd.conf

Search umask in this file, you will set below messages:

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)

Some mappers for permissions number to umask number:

umask = 022 => folder 755 file 644
umask = 077 => folder 700 file 600
umask = 002 => folder 770 file 664

But, how to map this by hand?

<umask num> + <folder num> = 777

<umask num> + <file num> = 666 (I guess…)

Update update this config file, restart vsftp.

sudo service vsftp restart

Resources