Jump to content

module has no permission to affect file structure


jimlongo

Recommended Posts

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.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated