Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hello everybody
I'm currently busy with developing a PHP system which needs ro run some commands such as vzctl. vzctl doesnt wants to run on a normal account and only on the root account. How can I run a root command with PHP and maybe C/C++ or perl??
OR is the best solution to put the command in a .sh file and set a cron job as root user on it? Or won't that work?
A possible solution is to add the user name that apache is running under to the sudoers file with the option to access those specific files and to not require a password. Keep in mind that this could open a security hole - so be carefull.
If you do this, just remember to add sudo to your commands.
A possible solution is to add the user name that apache is running under to the sudoers file with the option to access those specific files and to not require a password. Keep in mind that this could open a security hole - so be carefull.
If you do this, just remember to add sudo to your commands.
I have already tried to do this, but it didn't work. Probably I did something wrong, can you show me how I can do this?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.