I am running apache2 in Ubuntu 14.04. I have been having trouble with permissions with FTP clients and CMS that use backend FTP. I never seem to be able to get the permissions right. Should www-data be the owner of /var/www/html and root as a user assigned to that group?
相关问题
- Django check user group permissions
- Stop .htaccess redirect with query string
- .htaccess rule, redirecting old unexistent address
- How to deploy a web application Aurelia in an Apac
- Apache Directory Studio not opening
相关文章
- Apache+Tomcat+JK实现的集群,如果Apache挂了,是不是整个服务就挂了?
- How reliable is HTTP_HOST?
- Making a two way SSL authentication between apache
- Flutter - http.get fails on macos build target: Co
- UnicodeEncodeError when saving ImageField containi
- mod_rewrite only on GET
- jquery how to get the status message returned by a
- How do I debug errors that have no error message?
Try this command it worked for me
sudo chown $(whoami) your_folder_name
Some CMSes and Wordpress is especially bad about that because it's actually in the code to use the web user.
BTW you should never need to use
root
for ftp.www-data
the default apache user on ubuntu should own your web files/directory to work properly with many cmses.So this is what has worked before and what we did for clients with the same issue. chown the whole web root as
www-data
for bothuser and group
.So if your document root is
/var/www/html
, cd or change directory to/var/www
and run this to change ownership on all files and directories.while still in the
/var/www
directory add write permissions to the group for files and directories by running this command.Finally add your FTP user to the
www-data
group.Replace usename with your FTP client username
Now this setup should allow you to use manage files and still allow the CMS ftp backend to still function and write to the direc. Let me know how that works for you.