Note: This guide needs root access, which is full control of the server. It is for VPS and dedicated server owners. It is often seen with Plesk.
What does the error mean?
PHP is a language that many websites run on. The server runs a program file at /usr/bin/php. execve is the system call that starts a program. "Permission denied" means the system refused to start it.
Think of a door with a lock. The program is there, but the person asking has no key. Linux uses permissions as keys. They say who can read, write or run a file.
Common causes
- The PHP file lost its "run" permission.
- The PHP file is owned by the wrong user.
- A security tool, such as SELinux, blocks it.
- The file is a link that points to a missing or broken file.
- The disk where PHP lives is mounted with a "noexec" rule that blocks running programs.
Steps to find the cause
- Connect to your server with SSH.
- Look at the file.
ls -l /usr/bin/php
This shows the permissions, the owner and any link target. You want something like -rwxr-xr-x and owner root. The x letters mean "can run".
- If the
xis missing, add it.
chmod 755 /usr/bin/php
This lets everyone run the file, but only root change it.
- Fix the owner if it is wrong.
chown root:root /usr/bin/php
- If the file is a link, check where it points.
readlink -f /usr/bin/php
This prints the real file. Make sure that file exists and can run too.
- Check SELinux.
getenforce
If it says Enforcing, look in the log for blocks: grep php /var/log/audit/audit.log | tail. To restore standard labels, run restorecon -v /usr/bin/php.
- Test PHP.
/usr/bin/php -v
This prints the PHP version if everything works.
Warning: Do not use chmod 777 on system files. It is unsafe.
Quick recap
- The error means Linux will not let the tool run
/usr/bin/php. - Check permissions, owner and link target with
ls -l. - Fix with
chmod 755andchown root:root. - Check SELinux if permissions look fine.