0
votes

I was trying to set up my own web site on a small Ubuntu Server machine. All goes well, until I try to install the jquery-filemanager, and it creates an error because it cannot write to the directory: /var/www/html. I am using apache2, and I noticed that it requires root/sudo every time I try to delete/copy/move a file. I am pretty sure that this is what is causing this problem.

Is there a way to stop root from owning this directory, or are there any better websites that I could use?

Thanks.

EDIT: I did an "ls -la" on the directory "/var/www/html".

cameron@ubuntuserver:/var/www/html$ ls -la

total 72 drwxr-xr-x 10 root root 4096 Apr 14 16:53 . drwxr-xr-x 3 root root 4096 Apr 14 06:16 .. -rw-r--r-- 1 root root 203 Apr 13 19:25 AdminDevel.html -rw-r--r-- 1 root root 7372 Apr 13 19:49 contact.html drwxr-xr-x 2 root root 4096 Apr 13 16:44 css drwxr-xr-x 9 root root 4096 Apr 14 16:53 filemanager drwxr-xr-x 4 root root 4096 Apr 13 16:54 FOLDERS drwxr-xr-x 2 root root 4096 Apr 13 16:44 fonts -rw-r--r-- 1 root root 6056 Apr 13 19:33 games.html drwxr-xr-x 4 root root 4096 Jul 5 2012 halftone-files -rw-r--r-- 1 root root 73 Mar 4 13:25 .htaccess drwxr-xr-x 5 root root 4096 Apr 13 18:06 img -rw-r--r-- 1 root root 7769 Apr 14 15:00 index.html drwxr-xr-x 5 root root 4096 Apr 13 16:44 js drwxr-xr-x 2 root root 4096 Apr 13 16:44 less cameron@ubuntuserver:/var/www/html$

1

1 Answers

1
votes

Can you do a ls -la so we can see what the owner is and the permissions?

Anyway the permissions should be www-data if you are using apache. You can do this by doing sudo chown -R www:data-www:data /var/www/html

Read about chown and chmod.