Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I installed Wordpress in my Ubuntu 12.04 I found that Wordpress itself not write wp.config file.

He tell me to copy this into wp.config file. Look Like wordpress not able to write the files.

Now when I tried to install the plugin then it's not able to write the plugin so it's tell me to FTP detail.

this is my computer not server so I want to gave apache2 full permission to do any kind of operation.

Now somebody please help me on how I can set permission for apache. I have check but their is no group in my 12.04 installation that's called "apache".


share|improve this question
up vote 6 down vote accepted

Use following command:

chown -R www-data:www-data /var/www

This will make all your htdocs writable by Apache2.

share|improve this answer
By mistake I tried something and now it's only owned by www-data. please help me on give current user access to those file. – Gupta Anirudha Jan 23 '13 at 3:44
See what ever you do, content is always owned by a single user. If you want to give someone a write privilege to htdocs then its better to give a group write permission and add current user to www-data group. – Robin Jan 23 '13 at 4:02
I restart apache and now it's work fine. thanks – Gupta Anirudha Jan 23 '13 at 4:12
You are welcome – Robin Jan 23 '13 at 4:25
you saved my day @Robin , can we have more details on this command line ? i didnt have a group or user named www-data... – dzgeek Aug 29 '14 at 15:00

Your Answer


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.