exec is a functionality of an operating system that runs an executable file.
Questions tagged [exec]
53 questions
0
votes
2 answers
php can't execute any external command?
We moved from Slackware to CentOS here, it was working fine then without notice, php stopped executing external calls such as calls to "wc" and "spamc". All such calls appear on error_log as:
sh: /usr/bin/spamc: Permission denied
The paths are…

Andre Garzia
- 111
- 1
- 4
0
votes
1 answer
Subcommand in dockerised app exits with `exit code 1`
I have an application. The application is working on Linux, but I plan to migrate it to the docker container.
I developed some modules that can use embedded PostgreSQL instead of a regular Postgres database. It is working perfectly on my Host, but…

Daniel Hornik
- 152
- 7
0
votes
1 answer
How to allow PHP exec to reload NGINX
How can I allow these commands in PHP:
$output = exec('sudo nginx -t 2>&1');
$output2 = exec('sudo /usr/sbin/service nginx reload 2>&1');
I've looked into sudo visudo in the terminal , but it seems like that will give access to all sudo commands,…

Tom Tucker
- 3
- 2
0
votes
0 answers
php returns error code 127 persistently from exec/shell_exec python script even though script file is found in php by ls-al
I'm using a CentOS x86-64 Linux server, trying to run a python script from a php script called by an html-script. This is a well-covered topic on the internet, however nothing of the instructions and ideas work. I need this command chain later on to…

Anthony
- 1
- 1
0
votes
1 answer
php exec returning 127 because /bin/sh is getting "Permission denied" in apache chroot
I have a php script that is trying to use exec (or shell_exec) to execute a binary on the system. The exec is failing with return code 127.
Return code 127 normally means command not found. So I made sure to use the absolute path to the binary. No…

mhost
- 1,179
- 3
- 16
- 25
-1
votes
1 answer
Multiple Background Processes at Single Line Works in The Foreground
I want to convert an uploaded PDF file to JPG images and zip these images after convert process finishes. I use the ImageMagick library's convert command for PDF to JPG conversion.
To accomplish this, I use the && operand like this:
convert…

kubilay
- 159
- 1
- 3
- 12
-1
votes
2 answers
Better way to exec at a specific folder
It is possible to exec at the specific folder, rather than I need to use two commands separately?
e.g.
cd /opt/folderA
exec ....
cd /opt/folderB
exec ....

Howard
- 2,135
- 13
- 48
- 72
-4
votes
2 answers
Run a script.sh with www-data like it was root user
I need to get all mac Addresses from my network-card.
So i use nmap from Debian, combined with PHP.
But, without root privilege, this only gives me the IP address and status from a target. With root privilege, i get IP, status, and adresse MAC.
How…

Hihui
- 1
- 4