Correct permissions for /var/www and wordpress

Posted by dpbklyn on Ask Ubuntu See other posts from Ask Ubuntu or by dpbklyn
Published on 2012-07-12T16:47:04Z Indexed on 2012/10/30 11:21 UTC
Read the original article Hit count: 215

Filed under:
|
|

Hello and thank you in advance!

I am relatively new to ubuntu, so please excuse the newbie-ness of this question...

I have set up a LAMP server (ubuntu server 11.10) and I have access via SSH and to the "it works" page from a web browser from inside my network (via ip address) and from outside using dyndns.

I have a couple of projects in development with some outside developers and I want to use this server as a development server for testing and for client approvals. We have some Wordpress projects that sit in subdirectories in /var/www/wordpress1 /var/www/wordpress2, etc. I cannot access these sub directories from a browser in order to set up WP--or (I assume) to see the content on a browser. I get a 403 Forbidden error on my browser.

I assume that this is a permissions problem. Can you please tell me the proper settings for the permissions to: 1) Allow the developers and me to read/write. 2) to allow WP set up and do its thing 3) Allow visitors to access the site(s) via the web.

I should also mention that the subfolder are actually simlinks to folder on another internal hdd--I don't think this will make a difference, but I thought I should disclose.

Since I am a newbie to ubuntu, step-by-step directions are greatly appreciated!

Thank you for taking the time!

dp

total 12
drwxr-xr-x  2 root root 4096 2012-07-12 10:55 .
drwxr-xr-x 13 root root 4096 2012-07-11 20:02 ..
lrwxrwxrwx  1 root root   43 2012-07-11 20:45 admin_media ->     /root/django_src/django/contrib/admin/media
-rw-r--r--  1 root root  177 2012-07-11 17:50 index.html
lrwxrwxrwx  1 root root   14 2012-07-11 20:42 media -> /hdd/web/media
lrwxrwxrwx  1 root root   18 2012-07-12 10:55 wordpress -> /hdd/web/wordpress

Here is the result of using chown -R www-data:www-data /var/www

total 12
drwxr-xr-x  2 www-data www-data 4096 2012-07-12 10:55 .
drwxr-xr-x 13 root     root     4096 2012-07-11 20:02 ..
lrwxrwxrwx  1 www-data www-data   43 2012-07-11 20:45 admin_media -> /root/django_src/django/contrib/admin/media
-rw-r--r--  1 www-data www-data  177 2012-07-11 17:50 index.html
lrwxrwxrwx  1 www-data www-data   14 2012-07-11 20:42 media -> /hdd/web/media
lrwxrwxrwx  1 www-data www-data   18 2012-07-12 10:55 wordpress -> /hdd/web/wordpress

I am still unable to access via browser...

© Ask Ubuntu or respective owner

Related posts about server

Related posts about permissions