[BlueOnyx:11517] Re: Need CGI script to execute command as root
David Thacker
David at ThackerNet.com
Thu Oct 11 16:26:13 -05 2012
>> Warning: symlink() [function.symlink]: Permission denied in
>> {scriptname.php} on line 124
>>
>> The symlink source dir is owned by root, permissions 0755. The target
>> dir
>> is owned by the siteadmin:group of the site it is created in, with
>> permissions 2755.
>>
>> If I manually create a symlink from the commandline (logged in as
>> root),
>> it succeeds.
>>
>> I am guessing that the PHP script is failing because it is not running
>> as
>> root, even though it is running via admserv and not regular httpd.
>>
>> Are there any ideas on how to resolve this permission denied problem?
>>
Actually, it seems the PHP script is in fact running as root under
admserv. When I add the
echo get_current_user();
command into the script, the current user it reports is indeed "root".
> FWIW... How about a cronjob run as root?
If I cannot get this figured out then I will definitely pursue your
suggestion, thank you!
Regards,
David Thacker
More information about the Blueonyx
mailing list