drifter Posted December 21, 2006 Share Posted December 21, 2006 OK last week I posted about a problem I was having.Cron was running as my account name, the webserver was running as nobody. The result, when I create a file via web server, it could not be deleted by cron. (something as simple as upload and purge)OK so my hosting place said to go with phpsuexec. - Did that last week - took almost 20 hours to change permissions on all the files, not I find out... if you are running phpsuexec, you can't run eaccelorator or APC!!!What the heck! - so I fear this brings me back to my original problem. How do I make it so files can be writeable to cron and the web server. I know this is a very common task - people have clients upload all the time and then delete with cron.ThanksScott Link to comment https://forums.phpfreaks.com/topic/31524-file-ownership/ Share on other sites More sharing options...
The Little Guy Posted December 21, 2006 Share Posted December 21, 2006 Maybe this, I don't know much about Cron, so I googled, and came up with this site?http://www.esyndicat.com/support/desk/knowledgebase/view/3.html Link to comment https://forums.phpfreaks.com/topic/31524-file-ownership/#findComment-146123 Share on other sites More sharing options...
JP128 Posted December 21, 2006 Share Posted December 21, 2006 You can use a loop to get the files, and then chmod(); them[code]<?php$files = scandir("/");foreach ($files as $file){chmod($file, 0757);}?>[/code] Link to comment https://forums.phpfreaks.com/topic/31524-file-ownership/#findComment-146127 Share on other sites More sharing options...
drifter Posted December 22, 2006 Author Share Posted December 22, 2006 After much research, this is the newest plan seems the best...I am running apache as nobody again. Got APC going again.Now you can run you cron as nobody by editing the nobody crontab.you do need to remove nobody from your cron.deny list. Link to comment https://forums.phpfreaks.com/topic/31524-file-ownership/#findComment-146544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.