Solved

CentOS Apache Permissions Problem

Posted on 2006-11-15
9
641 Views
Last Modified: 2008-02-20
I've copied one of my gaming league sites over to a test server in my network where i can develop additional content for it.

I installed CentOS 4.4 and my problem is this version of Linux/Apache's behavior isn't allowing writing to any file in the /var/www/cgi-bin directory .... how can I fix this?

You can view the site here: http://24.39.162.71 , and if you browse around you'll notice the permission errors pop up, especially with regards to the ikonboard forums section (under comms, forums).

Any help would be greatly appreciated!
0
Comment
Question by:newimagent
  • 5
  • 4
9 Comments
 
LVL 1

Author Comment

by:newimagent
ID: 17950456
Thing is, on my web server, it uses a completely different model for setup and permissions, since it's running under Plesk, and for whatever reason, the permissions are happy there. I mimiced them exactly, and they don't work on my local server that is not running plesk.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 17953202
What is the userid that Apache runs under?

Does that userid, or the group it is in, have read access to all of the files and directories.
0
 
LVL 1

Author Comment

by:newimagent
ID: 17953239
i'm kinda a n00b to the administration side of linux ... i'm an mcse so i'm kinda like a fish out of water here setting up my own server as i usually just rent linux boxes when i need one. i got the forums to display, looks like the permission issue was related SELinux ... the enhanced security configuration. after disabling that the forums now show up, but i can't view posts. more errors, that are probably permission related. take a look at any post in the forums .. maybe you can give me some extra feedback.

apache has read and execute permissions
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 57

Expert Comment

by:giltjr
ID: 17953287
If this is a forum type setup wouldn't Apache need write access to something?

Where are you seeing the errors?  Apache's log?  What are the errors?
0
 
LVL 1

Author Comment

by:newimagent
ID: 17953307
http://24.39.162.71/cgi-bin/comms/forums/ikonboard.cgi?s=455be32e146c91ea;act=ST;f=1;t=496

there is an example of the forums error. you should be able to browse most sections of the site without being registered.

as far as write access the entire site is database driven. there is not one static page of html anywhere on the site. i would think write access would be required at the database level and not on the actual site.
0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 17953404
I didn't say what Apache may need write access to.  Unless you are spawing processes with the user's userid, then Apache would need authorization to update the database.

In the script TopicView.pm  at line 62 there was an error.  Yes, I know that is obvious.  What it looks like is that this script is doing a prepare in getting ready to query the  DB and one of the variable/parameters that is needed for the prepare statment is not set or is set wrong (out of range).

For example.  If I change t=496 to t=50 I get a totaly different  error, but a more "valid" error stating I need to be logged on.  I have no clue what "t=" is supposed to represent.  I would assume a topic number or a post number.

I need to go get some sleep.  I check in the morning to see if you have made any headway.


0
 
LVL 1

Author Comment

by:newimagent
ID: 17953470
yes t is the topic number. t=50 is a topic in a section of the forums that you need to be logged in to view.

my brain is fried for today, hopefully i'll come up with some new info tomorrow. I know how to chmod files through and ftp proggy, but haven't done it in command line or gui so that might be where i need to look next.
0
 
LVL 1

Author Comment

by:newimagent
ID: 17958614
well the majority of the problem was the SELinux configuration. With that out of the way it looks like all i was missing was the Time::Zone Perl module.

thanks for trying to help me out giltjr
0
 
LVL 57

Expert Comment

by:giltjr
ID: 17959358
SELinux can get you, its bit me more often than I care to admit.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question