Results 1 to 3 of 3
ok here is the deal, I need to read, from a browser, the contents of /var/spool/cron Of course its permissions are set to be very unfriendly to PHP (running as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-07-2013 #1
- Join Date
- Apr 2003
how to run a root process from php (not on CLI either)
ok here is the deal, I need to read, from a browser, the contents of /var/spool/cron
Of course its permissions are set to be very unfriendly to PHP (running as a linux user account) to read that folder.
So, I tried making a file in /home called /home/readcrons.php, I added the hashbang at top and chown'd to root, and made it executable. The file itself is pretty simple and there is no security risk in the file.
Now, in php, I tried:
It spit at me and said you don't have the permissions. I presume that even though the FILE is owned by root, it acts with the permissions of the user calling it, is this correct?
Is there ANY way I can make this work? There must be something built in that is simple and elegant..
- 02-08-2013 #2
- 02-08-2013 #3
- Join Date
- Mar 2008