Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix "execve() for program /usr/bin/php failed: Permission denied"

This guide helps when a server tool says it cannot run PHP because permission was denied.

Dedicated Servers2 min read7 steps

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

  1. Connect to your server with SSH.
  2. 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".

  1. If the x is missing, add it.
chmod 755 /usr/bin/php

This lets everyone run the file, but only root change it.

  1. Fix the owner if it is wrong.
chown root:root /usr/bin/php
  1. 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.

  1. 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.

  1. 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.

Tip: If it is still broken, reinstall the PHP package or ask for help. Open a support ticket.

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 755 and chown root:root.
  • Check SELinux if permissions look fine.