Change wordpress user from www-data to my username
-
Hi,
WordPress is using the name www-data to write files. I am using the username grimpanda.
If I change ownership to grimpanda:grimpanda I can FTP my files over without issue, but wordpress cannot write.
If I change ownership to www-data:www-data wordpress can write, but I cannot FTP.
grimpanda:www-data (wordpress cannot write, I can)
www-data:grimapanda (wordpress can write, I cannot)So I made a group called ‘webmasters’.
groupadd webmasters
added www-data and myself to that group
sudo usermod -a -G webmasters www-data
sudo usermod -a -G webmasters grimpanda
Change ownership:
sudo chown -R www-data:webmasters .
(no joy)
sudo chown -R grimpanda:webmasters .
(no joy)I would like to be able to FTP from my username, and have wordpress write as well. How do I do this?
Should I alter:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-datain my envvars? I am worried about security if I do this?
EDIT: I changed my /etc/apache2/envvars as mentioned above to my name and now it works if my wordpress is owned by my name and group (grimpanda:grimpanda) and I can of course FTP.
My question now from a linux guru:
Is this a safe and best practice?
Thanks a ton.
- The topic ‘Change wordpress user from www-data to my username’ is closed to new replies.