sudo chmod -R 775 /var/www/html on newly created directories in vsFTPd?

I am currently using this for my non-popular website:

sudo chmod -R 775 /var/www/html

And I have searched many hours on how to make newly created directories and files 775 - I've come across umask and GSID (CHMOD g+s...) stuff, but I don't know how to use those in my sudo chmod -R 775 /var/www/html

How do I make sudo chmod -R 775 /var/www/html for newly created files/directories in vsftpd? I get these permissions in newly created directories: drwx------ and files: -rw------- which means I can't do anything as a user and I want them to be (d)rwxrwxr-x; 775.

EDIT: umask 002 did not work, but I found out my "Owner/group" in my FTP shows as "33 33" on non-newly created directories/files when newly created ones are "1000 1000" what does that mean?

SOLUTION: Editing /etc/vsftpd.conf - making local umask=002, anon_upload_enable=YES, anon_mkdir_write_enable=YES and adding this at the bottom of the file: file_open_mode=0777

1 Answer

You can set

umask 002

And all new files will be created with 775 permission

If you like that the new files groupid will be equal to folder group I'd. You can for example change the folder group to be 1000 as the new files

12

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like