|
Cron jobs (Non FQ)
Hello:
Hopefully someone can help me understand best way to do this.
Here at FQ, I edit the Crontab (presumably as my user account) and the jobs (Perl Scripts) run fine.
I'm trying to do the same on a Ubuntu 13.10 Server, and having issues, and I think it is multiple things; root, users, group access, or combinations.
Scripts are in /home/johnb/scripts/ (755)
Website is in /var/www/ (765)
Cron jobs are run as johnb
Some files were not being written to /var/www/
I changed cronjobs to run as root - then files that weren't written are, but files that were already wrote, would not.
There were a mix of owners in /var/www/ so I changed them all back to root owner, several places on the web said this is best.
Also as suggested, I added a usergroup webmasters, and added user johnb to that, and added that group to /var/www/ which I think is a step in the right direction, but I am still having issues with scripts run as johnb not writing files to /var/www/
It's so much simple when the same user owns everything, but I understand the security issues.
So am I missing something here?
Does my user cron not have the same permissions as me?
If I am a member of the webmasters user group with write permissions, why can't my cron perl scripts write files to /var/www/ ?
I'm sure it's something simple, and I am just missing or misunderstand some little item.
If anyone has any thoughts on this, it would be appreciated.
Thanks.
John
__________________
Klaatu: I won't resort to threats, Mr. Harley. I merely tell you the future of your planet is at stake.
The Day the Earth Stood Still (1951)
|