LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   File permissions and cgi scripts (https://www.linuxquestions.org/questions/linux-general-1/file-permissions-and-cgi-scripts-146164/)

shaggystyle 02-14-2004 07:27 PM

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.

scott_R 02-14-2004 11:27 PM

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.

shaggystyle 02-16-2004 12:46 PM

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 :(

shaggystyle 02-16-2004 02:30 PM

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.

jazernorth 02-16-2004 02:33 PM

I know this is not your question, but have you looked into webalizer?

shaggystyle 02-16-2004 02:36 PM

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 ;)


All times are GMT -5. The time now is 03:22 PM.