LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-14-2004, 08:27 PM   #1
shaggystyle
Member
 
Registered: Dec 2003
Location: Louisville, KY
Distribution: Gentoo (desktop), Mandrake 10.0 (server)
Posts: 39

Rep: Reputation: 15
File permissions and cgi scripts


I'm trying to write a simple CGI script in C to pull information out of my apache access_log so I can keep track of traffic and which directories are getting the most hits. Thing is my log files are all restricted to high level users. So what I'm wondering is, is there anyway to get around to grant the script access to just this file without raising its permissions....possibly create a new group? I thought about just chmoding the file but won't the permissions just revert back when it archives the file at the end of each month? Thanks.
 
Old 02-15-2004, 12:27 AM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
your file permissions should stay the same, regardless of archiving (which makes sense if you think about the mess it might cause otherwise). If you're dealing with a production system, or this file is something that you might want to change in the future, a group dedicated to it (and other related files) would be my preference.
 
Old 02-16-2004, 01:46 PM   #3
shaggystyle
Member
 
Registered: Dec 2003
Location: Louisville, KY
Distribution: Gentoo (desktop), Mandrake 10.0 (server)
Posts: 39

Original Poster
Rep: Reputation: 15
Well I moded the file and folders I need (755) works great....for about an hour or two then the permissions all revert back. So whats the deal why is this happening? Cron job maybe? Help
 
Old 02-16-2004, 03:30 PM   #4
shaggystyle
Member
 
Registered: Dec 2003
Location: Louisville, KY
Distribution: Gentoo (desktop), Mandrake 10.0 (server)
Posts: 39

Original Poster
Rep: Reputation: 15
Ok, so I figured out what was changing my permissions....something called msec, chich is running as an hourly cron job so I was partly right in my above guess. Now my question is....can anyone tell me how to configure this damn thing. I've spent an hour trying to track down its config file and have found a ton of files but not the database that tells which folders have which permissions assigned to them. Thanks again.
 
Old 02-16-2004, 03:33 PM   #5
jazernorth
Member
 
Registered: Jan 2004
Location: Green Bay
Distribution: RedHat 8.0, LFS-5.0
Posts: 100

Rep: Reputation: 15
I know this is not your question, but have you looked into webalizer?
 
Old 02-16-2004, 03:36 PM   #6
shaggystyle
Member
 
Registered: Dec 2003
Location: Louisville, KY
Distribution: Gentoo (desktop), Mandrake 10.0 (server)
Posts: 39

Original Poster
Rep: Reputation: 15
I looked around at some prefab scripts but couldn't find any that really did what i wanted....plus I'm kind of doing this as a project to help me learn more linux so a lot of it just so I can say I did it without too much help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SELinux and CGI Scripts silvercloud Linux - Enterprise 0 08-24-2005 12:35 AM
Symlinked CGI scripts Chrax Linux - Networking 4 05-04-2005 09:39 AM
Getting CGI scripts to work Cool_Hand_Luke Linux - Newbie 5 03-09-2005 06:33 PM
Apache cgi scripts! boyinfrance Linux - Newbie 2 06-22-2002 11:33 PM
Can't execute *.cgi scripts. BrianG Linux - General 1 04-11-2001 04:38 AM


All times are GMT -5. The time now is 11:41 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration