Solved

CentOS Apache Permissions Problem

Posted on 2006-11-15
9
650 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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