Jump to content

Need to run command as root without sudo or cron


tibberous

Recommended Posts

I need to make a web interface that is able to change the permissions on files owned by root; This means being able to run the chmod command as root.

 

Is there a way to do this? It seems like anything I start from the website is ran as apache. I tried to make a perl file, set the permissions to 7775 and start it from PHP but it didn't do anything -- not sure I did it right.

 

Any ideas?

It would still require the attacker being able to write to PHP and Perl files on the server

No, if the apache user had root permissions and you had a script that modifys files then it could be possible to inject code.

 

Anyhow this question is probably better posted in the linux forum as it is not php specific.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.