0

I have a windows 7 system.
On this system i am running a VM Virtual box LAMP Server with Ubuntu 12.04,apache2, mysql and phpmyadmin... which is accessable via the internet.

I installed Wordpress CMS and it is working ok. I am able to add new posts, pages, and change themes.

When i attempt to upload media i get the following error

file391.jpg has failed to upload due to an error
Unable to create directory wp-content/uploads/2013/11. Is its parent directory writable by the server?*

When i go to the parent directory and look at the permissions i notice that the ownership of the folder is root.

Do i change owner? Should i create a new user or user group called worpress and give it ownership???

Not sure how best to do this on a Web server.

1

1 Answer 1

3

Apache2 is using the group www-data. You may want to add your current user into the www-data group by executing : sudo useradd -g www-data username.

Alternatively, you can do a recursive chown to the web root folder. To do this, issue the following command : sudo chown -R www-data:www-data /var/www

3
  • how do i know what group apache2 is using???
    – adam
    Nov 10, 2013 at 6:47
  • Ubuntu (and Debian) uses www-data as default user and group for apache2 by default. You can specify other users to join the www-data group though. You may want to check the contents of the umbrella file apache2.conf which will have something like User ${APACHE_RUN_USER} and Group ${APACHE_RUN_GROUP}.
    – Chester
    Nov 11, 2013 at 1:48
  • You can also use apache2ctl -S to display your current setup.
    – Chester
    Nov 11, 2013 at 1:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .