0

Possible Duplicate:
Allow WordPress to Update on Local Apache2 Install

I have a local dev environment set up with a LAMP stack, it's used for WordPress development.

Now, whenever I want to edit a file in /var/www/mysite I need to type in sudo before I can edit anything. This is obviously a unnecessary, and I was wondering what I need to set up to fix this issue.

Zach Russell
  • 277
  • 1
  • 3
  • 13
  • It's not, completely separate. My question is to not have to enter "SUDO" everything I want to enter a file in /var/www/mystie. This changed once changed ownership of www-data to allow WordPress to update itself. – Zach Russell Jan 13 '13 at 00:01
  • I figured it out. `sudo chown -R myuser mysite` – Zach Russell Jan 13 '13 at 00:10

1 Answers1

1

You can add yourself into the www-data group

Then you would have to make all files writeable for the group www-data: sudo chmod g+w * -R, but if wordpress creates new files those will have the wrong permissons again. To avoid that you have to set the umask, check this link for further information: https://wordpress.stackexchange.com/questions/2200/cant-install-new-plugins-because-of-the-error-could-not-create-directory

or since you are on your local system and don't have to fear the evil internet, you could run apache under your user.

Most often you can find the settings in httpd.conf, there you will find two options:

User www-data
Group www-data

Hope I could help

isset
  • 148
  • 5
  • Thank you, great answer. I ended up figuring it out myself, but thanks for the reassurance! I'd up-vote you but I can't yet :( – Zach Russell Jan 13 '13 at 03:44