Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
see this post to change ownership of a folder askubuntu.com/questions/235296/… –  Avinash Raj Nov 7 '13 at 5:20
add comment

1 Answer 1

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

share|improve this answer
    
how do i know what group apache2 is using??? –  adam Nov 10 '13 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 '13 at 1:48
    
You can also use apache2ctl -S to display your current setup. –  Chester Nov 11 '13 at 1:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.