Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running Ubuntu 14 LTS with nginx. I have a projects folder that I am working in. I am working in this folder /var/www/html/somedomain.com/projects as root because my user account has no access. This directory is chown to www-data:www-data because there is a wordpress site there, and wordpress gets cranky with you try to upgrade or install things and wordpress is not permissible. The projects folder is not wordpress, but the creation of files are owned by root, and I would like them to be www-data so I don't have to keep running chown.
If your projects folder is owned by root have you tried to change it to www-data? Simple enough to change back if it doesn't help. I've not used wordpress or nginx but on an Apache server you should be able to have sub-directories owned by a user.
After running "usermod -aG www-data myusername" you need to login again before your current session is in the group. Then you should be able to touch /var/www/html/myfolder/README provided it has group write permissions.
After running "usermod -aG www-data myusername" you need to login again before your current session is in the group. Then you should be able to touch /var/www/html/myfolder/README provided it has group write permissions.
If that didn't work, post the results of
Code:
namei -lx /var/www/html/myfolder/README
from user executed touch /var/www/html/README
Code:
Drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x www-data www-data www
drwxr-xr-x www-data www-data html
README - No such file or directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.