Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have OS X 10.5 with about 40 websites in the Sites directory. I just downloaded one from my server to initialize a local copy but I am getting denied access. The permissions seem fine but Apache is still giving me the 403. Any ideas why this would happen? Does it have to do with me downloading the files from the internet?

drwxr-xr-x  30 TAmoyal  TAmoyal   1020 Jul 17 19:45 ./
drwxr-xr-x+ 55 TAmoyal  TAmoyal   1870 Jul 17 19:45 ../
-rw-r--r--@  1 TAmoyal  TAmoyal    170 Jul  6 02:40 .htaccess
-rw-r--r--   1 TAmoyal  TAmoyal    397 Jul  2 19:08 index.php
-rw-r--r--   1 TAmoyal  TAmoyal  15129 Jul  2 19:08 license.txt
-rw-r--r--   1 TAmoyal  TAmoyal   7638 Jul  2 19:08 readme.html
drwxr-xr-x  89 TAmoyal  TAmoyal   3026 Jul 17 16:24 wp-admin/
-rw-r--r--   1 TAmoyal  TAmoyal  40543 Jul  2 19:10 wp-app.php
-rw-r--r--   1 TAmoyal  TAmoyal    220 Jul  2 19:10 wp-atom.php
-rw-r--r--   1 TAmoyal  TAmoyal    274 Jul  2 19:10 wp-blog-header.php
-rw-r--r--   1 TAmoyal  TAmoyal   3649 Jul  2 19:10 wp-comments-post.php
-rw-r--r--   1 TAmoyal  TAmoyal    238 Jul  2 19:10 wp-commentsrss2.php
-rw-r--r--   1 TAmoyal  TAmoyal   2550 Jul  2 19:10 wp-config-sample.php
-rw-r--r--@  1 TAmoyal  TAmoyal   2458 Jul 17 16:41 wp-config.php
drwxr-xr-x   5 TAmoyal  TAmoyal    170 Jul 17 16:25 wp-content/
-rw-r--r--   1 TAmoyal  TAmoyal   1254 Jul  2 19:11 wp-cron.php
-rw-r--r--   1 TAmoyal  TAmoyal    220 Jul  2 19:11 wp-feed.php
drwxr-xr-x  77 TAmoyal  TAmoyal   2618 Jul 17 16:29 wp-includes/
-rw-r--r--   1 TAmoyal  TAmoyal   1946 Jul  2 19:14 wp-links-opml.php
-rw-r--r--   1 TAmoyal  TAmoyal   2341 Jul  2 19:14 wp-load.php
-rw-r--r--   1 TAmoyal  TAmoyal  21019 Jul  2 19:14 wp-login.php
-rw-r--r--   1 TAmoyal  TAmoyal   7113 Jul  2 19:14 wp-mail.php
-rw-r--r--   1 TAmoyal  TAmoyal    487 Jul  2 19:14 wp-pass.php
-rw-r--r--   1 TAmoyal  TAmoyal    218 Jul  2 19:14 wp-rdf.php
-rw-r--r--   1 TAmoyal  TAmoyal    316 Jul  2 19:14 wp-register.php
-rw-r--r--   1 TAmoyal  TAmoyal    218 Jul  2 19:14 wp-rss.php
-rw-r--r--   1 TAmoyal  TAmoyal    220 Jul  2 19:14 wp-rss2.php
-rw-r--r--   1 TAmoyal  TAmoyal  21213 Jul  2 19:14 wp-settings.php
-rw-r--r--   1 TAmoyal  TAmoyal   3434 Jul  2 19:14 wp-trackbac

Thanks

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Have you checked Apache's error log (/var/log/apache2/error_log)? It might also have to do something with the .htaccess file your listing shows.

share|improve this answer
    
The error log should give you more detail then just "forbidden" –  LapTop006 Jul 18 '09 at 13:36
    
had to add followsymlinks, thanks –  Tony Jul 18 '09 at 14:19

Check the entire path to the directory. Apache needs to be able to read through (x permission) each element of the path in order to be able to reach that directory.

share|improve this answer
    
as i stated in the question (but maybe it's still unclear), apache can read the other sites. so the path to my Sites is certainly readable. and as you can see from my ls, the current directory is executable by all –  Tony Jul 18 '09 at 13:24

every directory in the path to those files needs to be executable by the apache process.

so if those files are in /var/www/example/site then /var, /var/www, /var/www/example, and /var/www/example/site ALL need to be executable by the apache process.

an easy way to make /var/www and all subdirectories thereof executable for ALL users is (as root, or some other user who was write access to all directories involved):

chmod -R a+X /var/www

note that's a capital X - that tells chmod to only make directories executable, not files.

there are other variations, such as "chmod -R ug+X /var/www" if you only want the dirs to be executable by the owner and group members.

share|improve this answer
    
as i stated in the question (but maybe it's still unclear), apache can read the other sites. so the path to my Sites is certainly readable. and as you can see from my ls, the current directory is executable by all –  Tony Jul 18 '09 at 13:26

Your Answer

 
discard

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.