0

So, I'm using Ubuntu desktop and have installed Apache, PHP and MySQL, all working great.

I want to use start adding files and folders to /var/www using the file manager, but my user doesn't have permissions to do this.

Any ideas what permissions I need to update?

mmyers
  • 184
  • 4
  • 15
JamesA
  • 103
  • 2
  • Consider Setting up a [Virtual Host](https://help.ubuntu.com/10.04/serverguide/httpd.html), and make the host point to /home//public_html/ – eyoung100 Apr 24 '14 at 22:39

3 Answers3

1

Create a directory in your home, ie:

mkdir ~/my_dir

then, create a symbolic link in /var/www/:

ln -s ~/my_dir /var/www/my_dir

This allows you to write to the directory. If apache needs to access, you must change the group to all the directories where you want this to happen:

sudo chown -R <user>:www-data ~/my_dir 
girardengo
  • 4,925
  • 1
  • 26
  • 31
0

Try this:

sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www

The user should be able to edit /var/www/ without any problems.

Cody
  • 354
  • 1
  • 3
  • 12
0

You may also start nautilus as root:

sudo -i nautilus &
Seth
  • 57,282
  • 43
  • 144
  • 200
JHGouveia
  • 11
  • 2