jimlongo Posted November 1, 2018 Share Posted November 1, 2018 I'm trying to automate updates for my module, and I want to place a file in /etc/cron.d/ as this is a common way for packages to check for updates. However my module's php code is incapable of copy() or unlink() to this folder. The issue is that the cron folder and its files are all owned by root. The controller that is attempting this is owned by root, but is running as the user 'nobody' or the 'accountowner' depending on who you ask. get_current_user() = 'accountowner' shell_exec(whoami)='nobody' There seems to be no WHMCS APIs to change files. I've also attempted to do this by having my php controller invoke a shell script, but I run into the exact same issue. Any ideas as to how this can be accomplished? Thank you for any ideas. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.