Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forbidden error with perl scrips..

Status
Not open for further replies.

f0rmat

IS-IT--Management
Jun 2, 2004
102
US
Hello all,
I'm pretty new to apache and wiki's and here's what I'm trying to do. I'm migrating a bunch of MoinMoin wiki's from an old RH 7.2 box to a new RHELWS 4.0 box.. running apache2. I keep getting a forbidden error when I try to access one of the wiki's.. basically the process is.. there's a main perl script that creates the wiki directory(works fine) but, when I click on one of the links.. the perl script wiki.pl tries to call a cgi script.. moin.cgi.. and that's when it fails.. cgi and perl both must be working fine because I loaded a test perl script and it works.. and the main wiki page gets built so im assuming cgi works.. the error I get is below..

[Thu Aug 11 10:20:56 2005] [error] [client 10.59.0.24] (13)Permission denied: ac
cess to /iona-wiki/ denied, referer: wiki.pl

I'm pretty sure all directorys are owned by nobody, and apache runs as nobody.. so im not sure whats going on. any ideas?
 
This maybe a path issue if the server thinks you are calling a script off the root directory. In other words it thinks /iona-wiki is an absolute path not a relative one.
 
actually I figured it out.. apparently some of the directories under my root(rather where the wiki's start) weren't all owned by nobody.. so a chown -R nobody.nobody fixed things nicely!
 
Allow me to explain RhythmAce..
Every file on the old wiki server was owned by nobody(the user ID, permission wise) and the apache daemon(httpd) ran as nobody.. on my new machine, apache ran as apache.. and therefore some of the files that I kept on the new machine(httpd.conf etc..) were owned by root or apache.. which was causing me permission issues.. so I just changed httpd to run as nobody and changed all the file permissions to nobody:nobody(user:group)

drwxr-xr-x 6 nobody nobody 4096 Jun 16 00:38 data
 
I understand. I was just kidding. Usually the first thing you check when you get a permissions error is to check your permissions. By your post, I assumed you did that so I was razzin' ya about it. ;-)

 
lol, whoops :) well see the funny thing was... I did check them... I just didnt drill down to the part that was actually giving me the error.. this was my first time really dealing with configuring apps on a linux box(and dealing with wikis) so it was like... ok where is all the stuff that matters :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top