Solve the problem of coexistence of apache and vsftpd write permissions
Source: Internet
Author: User
Sometimes, when apache has the write permission, vsftpd cannot be uploaded. in turn, vsftpd can be uploaded, but apache has no write permission. Now let's take a look at how to solve this problem. The solution is to add the ftp user to the apache user group and set the write permission for the user group... sometimes, when apache has the write permission, vsftpd cannot be uploaded. in turn, vsftpd can be uploaded, but apache has no write permission. Now let's take a look at how to solve this problem. The solution is to add the ftp user to the apache user group and set the user group to have the write permission.
Suppose we now have an ftp User: centos, and the httpd process runs as an apache user.
1. add centos to user group apache
Usermod-a-G apache centos
2. set all groups of the website root directory/var/www to apache.
Chown-R: apache/var/www
3. set the root directory of the website to read and write permissions for the user group.
Chmod-R g + rw/var/www
Finally, you need to confirm that vsftpd is in the configuration file local_umask = 002 so that the user group of the newly uploaded file has the write permission.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service