Answer the question
In order to leave comments, you need to log in
Error when running sh script with creating openvz server via php, how to fix?
Hello.
Please help me understand what's wrong. I run the sh script via php exec ("sh /var/www/users/$username/user.sh &");, and in the Apache logs I get the following error:
Container config file does not exist
Unable to open /dev/vzctl: Permission denied
Please check that vzdev kernel module is loaded and you have sufficient permissions to access t he file.
But when I run it manually like: sh /var/www/users/$username/user.sh , everything works without problems. Can you point me in the right direction, so to speak? What could possibly be the problem? Perhaps, in order for openvz to run through php, you need to install some kind of add-on?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Your web server must be running under the www-data user. Check that this user has read and execute access to /var/www/users/$username/user.sh and all files/devices described in user.sh.
Check if the exec function is disabled in the php.ini config, often disabled for greater security
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question