Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to access zip, unzip and du from a web application. I've done this before on other servers and had no problems, however when I enter the paths in /usr/bin the application reports that they're not correct.

I've checked and the paths are correct and I can use zip and unzip as root from SSH. Is it a permissions thing? Here are the ls -l outputs for each

-rwxr-xr-x 1 root root      66240  Feb  28 du
-rwxr-xr-x 1 root root      77280  Mar  11 zip
-rwxr-xr-x 1 root root     125432  Mar  11 unzip

Apache runs as apache:apache and I'm using PHP as a CGI application according to Plesk. SELinux is currently Disabled

Thanks for looking.

share|improve this question
up vote 4 down vote accepted

Check your php.ini and see if the function that you are using to run the programs have been disabled by the disable_functions setting e.g.

disable_functions=exec,shell_exec,system,proc_open ... 

If the function you are using is listed, remove it.

EDIT: from the comments the solution was to set


in php.ini.

share|improve this answer
there are no disabled functions, thanks for helping – sgtbeano Jul 18 '11 at 10:00
@sgtbeano: Can you tell us what function you are using and what the error message is please. – Iain Jul 18 '11 at 10:04
zip, unzip, du and aspell as detailed here No error message I'm afraid other than a red X in the Moodle Admin interface next to each entry. – sgtbeano Jul 18 '11 at 10:05
Found it, safe mode was on, switching this off fixed the issue. Thanks for your help, I wouldn't have found it without you prompting me to look in the PHP ini. – sgtbeano Jul 18 '11 at 10:10

SELinux is probably enabled. Check that with getenforce. If it says Enforcing, SELinux is most likely the blocker. You may disable SELinux temporarily (until next reboot) with command setenforce 0, or permanently by modifying /etc/selinux/config and setting SELinux disabled.

Alternatively you can modify SELinux settings to be more permissive with various SELinux tools available.

EDIT: So it seems SELinux is already disabled. What is the exact error message you get?

share|improve this answer
It says Disabled – sgtbeano Jul 18 '11 at 9:29
Added SELinux info to the original, thanks helping though – sgtbeano Jul 18 '11 at 9:39
Please then paste the exact error message you're getting :) – Janne Pikkarainen Jul 18 '11 at 9:42
That's the thing, there aren't any errors in the webapp (moodle), just a red X next to each path. Here's the howto doc which I've read despite doing this countless times before. – sgtbeano Jul 18 '11 at 9:49

By editing php.ini, you are disabling safe_mode server wide. Actually, you have the option in your plesk itself under Plesk >> Domains >> Domain Name >> WebHosting Settings section to disable safe mode for particular domain. This will keep the master value to "On" and Local value to "Off" for the particular domain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.