1

I am new to Ubuntu as of yesterday and trying to upload a new site. When I was attempting to delete everything from /var/www I accidentally deleted the www directory as well. What steps do I need to take to rebuild/recover the directory with all of the appropriate permissions?

David Foerster
  • 36,890
  • 56
  • 97
  • 151
tuckerv77
  • 13
  • 3

2 Answers2

4

Taking the recommended permissions from https://askubuntu.com/a/51337/175814, as super-user run:

mkdir -m 0775 /var/www
chown www-data:www-data /var/www
David Foerster
  • 36,890
  • 56
  • 97
  • 151
0

If you haven't yet tried reinstalling Apache, try that. You can do so by running:

sudo apt-get install --reinstall apache2
Eliah Kagan
  • 119,640