This article is a mirror article of machine translation, please click here to jump to the original article.

View: 5757|Reply: 0

[FTP] vsftp upload file permission issue

[Copy link]
Posted on 11/28/2021 11:37:33 AM | | | |
file_open_mode the same permission to upload files as chmod uses. If you want the uploaded file to be executed, set this value to 0777.

local_umask=022 This is the file permission setting after specifying the local user's upload

umask is a concept of the Unix operating system, umask determines the initial permissions given when directories and files are created
When umask = 022, the permission of the new directory is 755 and the permission of the file is 644
When umask = 077, the permission of the new directory is 700, and the permission of the file is 600
The local_umask and anon_umask of VSFTPD borrowed from it
By default, the file permission after vsftp upload is 600 and the directory permission is 700
There are two situations where you want to modify the permissions of the uploaded file
If the user is using vsftp, it is a local user
Modify the value of local_umask in the configuration file
If the vsftp is used by a virtual user
Modify the value of anon_umask in the configuration file


If you use nginx to read an FTP upload file 403 error, it may be a permission issue.

Add (attach) the nginx user to the ftp group: usermod -G ftp nginx

To remove an Nginx user from an FTP group:
gpasswd -d userName groupName
gpasswd -d nginx ftp

View the group to which the nginx user belongs: groups nginx







Previous:Linux systemd service manager explained in detail
Next:[Practice] Check php-fpm status information through Nginx
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com