LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2009, 12:50 AM   #1
a_m0d
Member
 
Registered: Apr 2007
Location: Perth, WA, Australia
Distribution: Fedora 8, Fedora 10
Posts: 49

Rep: Reputation: 15
Unhappy 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?
 
Old 06-25-2009, 01:15 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
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

Last edited by kirukan; 06-25-2009 at 01:18 AM.
 
Old 06-25-2009, 01:24 AM   #3
a_m0d
Member
 
Registered: Apr 2007
Location: Perth, WA, Australia
Distribution: Fedora 8, Fedora 10
Posts: 49

Original Poster
Rep: Reputation: 15
My css files don't include any php at all - they are just plain text. Why should I run them through the php interpreter?
 
Old 06-25-2009, 01:37 AM   #4
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
give execute permission as well then try
 
Old 06-25-2009, 01:44 AM   #5
a_m0d
Member
 
Registered: Apr 2007
Location: Perth, WA, Australia
Distribution: Fedora 8, Fedora 10
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
give execute permission as well then try
Nope, tried that but it doesn't make any difference
 
Old 06-25-2009, 02:05 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I had a similar problem a while ago. See http://www.linuxquestions.org/questi...elinux-703273/ if you have SELinux enabled.
 
Old 06-25-2009, 02:23 AM   #7
a_m0d
Member
 
Registered: Apr 2007
Location: Perth, WA, Australia
Distribution: Fedora 8, Fedora 10
Posts: 49

Original Poster
Rep: Reputation: 15
Thank you very much - that was indeed the problem. Solved now!
 
  


Reply

Tags
apache, httpd, permissions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache file permissions problem. {Apache/2.2.6 Fedora 8} hacker supreme Linux - Server 5 01-31-2008 03:26 PM
Apache 2 permissions problem? Samoth SUSE / openSUSE 8 05-28-2006 08:50 AM
Permissions problem in Apache 1.3 irfanhab Linux - Networking 11 05-21-2006 08:14 AM
Fedora3 + Apache Permissions problem stedo Linux - Software 2 01-18-2005 07:17 AM
Apache, RedHat ES Permissions Problem kclevenger Linux - General 0 05-25-2004 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration