Solved

CentOS Apache Permissions Problem

Posted on 2006-11-15
9
633 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 57

Expert Comment

by:giltjr
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:newimagent
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
SELinux can get you, its bit me more often than I care to admit.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now