LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Permissions problem with apache (https://www.linuxquestions.org/questions/linux-server-73/permissions-problem-with-apache-735457/)

a_m0d 06-25-2009 12:50 AM

Permissions problem with apache
 
I have setup apache on my machine, and I am having some trouble with permissions. I have a number of files in one folder, all with exactly the same permissions and ownership, but only some of them are accessible - the rest give an error of 403 Forbidden. Here is the directory listing:
Code:

[a_m0d@localhost]$ ll
total 48
-rw-rw-r-- 1 a_m0d a_m0d  6193 2009-06-24 23:41 compressed.css
-rw-rw-r-- 1 a_m0d a_m0d  168 2009-06-25 08:27 footer.tpl.php
-rw-rw-r-- 1 a_m0d a_m0d  1189 2009-06-25 08:27 header.tpl.php
-rw-rw-r-- 1 a_m0d a_m0d  685 2009-06-25 08:16 home.tpl.php
-rw-rw-r-- 1 a_m0d a_m0d  1904 2009-05-30 04:31 ie.css
-rw-rw-r-- 1 a_m0d a_m0d  409 2009-06-25 08:05 jobs.tpl.php
-rw-rw-r-- 1 a_m0d a_m0d  1311 2009-05-30 04:31 print.css
-rw-rw-r-- 1 a_m0d a_m0d 13451 2009-06-25 08:16 screen.css

This is the directory listing of the parent directory:
Code:

[a_m0d@localhost trunk]$ ll
total 76
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-05-28 20:08 admin
-rw-rw-r-- 1 a_m0d a_m0d    38 2009-06-05 19:13 config.inc.php
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-05-28 20:08 controllers
drwxr-xr-x 2 a_m0d a_m0d 36864 2009-06-25 07:24 icons
-rw-rw-r-- 1 a_m0d a_m0d  1314 2009-06-24 23:10 index.php
-rw-rw-r-- 1 a_m0d a_m0d  1026 2009-06-24 23:20 job.php
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-06-25 13:15 layout
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-05-28 20:08 modules
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-06-17 22:11 pages
drwxrwxr-x 4 a_m0d a_m0d  4096 2009-06-09 08:03 registry
drwxrwxr-x 3 a_m0d a_m0d  4096 2009-06-17 22:18 skins

Here is the relevant entry from the apache log:
Code:

[Thu Jun 25 13:13:21 2009] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /var/www/html/cabinets/trunk/layout/screen.css, referer: http://localhost/cabinets/trunk/layout/
I cannot access screen.css, ie.css, or print.css, but all the rest show up quite fine in the browser when accessed through the server.

Any suggestions as to what I can do?

kirukan 06-25-2009 01:15 AM

Refer this
http://www.linuxquestions.org/questi...pting.-483282/

and check this following line at your httpd.conf
Quote:

AddType application/x-httpd-php .css

a_m0d 06-25-2009 01:24 AM

My css files don't include any php at all - they are just plain text. Why should I run them through the php interpreter?

vap16oct1984 06-25-2009 01:37 AM

give execute permission as well then try

a_m0d 06-25-2009 01:44 AM

Quote:

give execute permission as well then try
Nope, tried that but it doesn't make any difference

Wim Sturkenboom 06-25-2009 02:05 AM

I had a similar problem a while ago. See http://www.linuxquestions.org/questi...elinux-703273/ if you have SELinux enabled.

a_m0d 06-25-2009 02:23 AM

Thank you very much - that was indeed the problem. Solved now!


All times are GMT -5. The time now is 10:36 AM.