Questions tagged [exec]

exec is a functionality of an operating system that runs an executable file.

53 questions
16
votes
1 answer

Failed at step EXEC spawning... Permission denied

I have read alot about this but still not sure why this is not working. as far as I know all dirs have the right permission and even with everything being 777 I still get permission denied when trying to run this program as a service. the program I…
Stone Monarch
  • 173
  • 1
  • 1
  • 5
12
votes
1 answer

How do I configure SSHd to permit a single command, without giving full login access to the user?

I am looking for best way to call remote command over SSH. I create user 'rpcall', generate new certificate and fill authorized_keys. Secure it little bit more with from="ip",no-agent-forwarding,no-X11-forwarding,no-port-forwarding,no-pty ssh-rsa…
andrew
  • 275
  • 1
  • 2
  • 10
5
votes
4 answers

Permission denied to remount tmp for exec

I'm running Fedora Linux on MediaTemple using their (ve) virtual Linux box. Pretty much a clean install (Linux ************ 2.6.18-028stab089.1 #1 SMP Thu Apr 14 13:46:04 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux). I'm trying to do some Pear installs…
nicktacular
  • 153
  • 1
  • 4
4
votes
2 answers

wkhtmltopdf call from PHP exec results in exit code 127 failure

Using CentOS 6.3x64. I'm trying to run wkhtmltopdf (from here) from a PHP script. I can successfully call wkhtmltopdf-amd64 directly via SSH. But when calling it from PHP via exec, it always fails with exit code 127. The path is correct, so that…
N Rohler
  • 141
  • 1
  • 5
4
votes
1 answer

exec sudo and/or send signal to child

I would like to execute an application (gnutls-cli) as another user and send a signal to it (SIGALRM). Unfortunately this does not work: sudo -u myuser gnutls-cli -p smtp imap.gmail.com --starttls & sudo -u myuser kill -ALRM $! gnutls-cli is a…
TheSudoMan
  • 41
  • 2
3
votes
2 answers

mysqldump (using PHP exec) not dumping file but no error

I wasn't sure if this was a SO or SF question but I thought this might be the best place. I apologise if it is not! I am using mysqldump through PHP exec but it doesn't seem to be working. The code I am using is
Syn
  • 141
  • 1
  • 3
3
votes
1 answer

Fedora 15 PHP exec() does not work

I cannot run an executable by PHP exec() function. OS: Fedora 15 PHP safe_mode off PHP code is: $exe = "/tmp/defne/./CwCssUGxhjAc"; $result = system( $exe, $retval ); chmod 777 on /tmp/defne and /tmp/defne/CwCssUGxhjAc I can run it on the command…
Memento
3
votes
4 answers

php rsync with exec() not working

Why this: rsync -avz -e ssh /home/userneme/folder username@domain.com:/var/www/folder works from cronjob and this: exec("rsync -avz -e ssh /home/userneme/folder username@domain.com:/var/www/folder"); doesn't work. I know exec is working because i…
mojeime
  • 33
  • 1
  • 4
2
votes
1 answer

sudo start my-project does not work

I'm using the following script in /etc/init/my-project.conf on my AWS instance. description "start and stop the go program 'my-project'" start on filesystem or runlevel [2345] stop on runlevel [!2345] env USER='ec2-user' env…
Thellimist
  • 121
  • 3
2
votes
1 answer

Php's shell_exec() and apache

I'm running a ZMQ 'push' interface via Ratche on an Apache server, which works very well on the command line, interacting with my server exactly the way I'd like. Here's the code //script1.php
A A Karim
  • 41
  • 6
2
votes
2 answers

Invalid argument when running 'find' command with -exec and -mtime

Pretty wierd error message came up on Centos. I tried to run this command: find /tmp/something -type f -mtime +2h -exec cp '{}' /tmp/target \; And the error I've got: find: invalid argument `-exec' to `-mtime' Can the 'find' be different on other…
t.fazakas
  • 61
  • 1
  • 1
  • 6
2
votes
1 answer

Systemd service not starting - 'Failed at step EXEC spawning… Permission denied'

I've read other answers for similar issues (Failed at step EXEC spawning... Permission denied) and none seem to apply. After I upgraded my bitcoin node to v0.20.0 it is no longer starting on boot nor manually with systemctl start…
Baron Mingus
  • 123
  • 1
  • 1
  • 5
1
vote
1 answer

Replacing Backup Exec 2010 R3 - Need Recommendations

I have been upgrading servers over the last few weeks, and stumbled on the realization that our current backup solution needs to change due to incoming incompatibilities. We currently use Symantec Backup Exec 2010 R3 to do weekly backups of eight…
1
vote
1 answer

How to write standard output and error to log and from exec

For example, write standard err and standard output to $LOG. but this not print anything to standard output ( on console ) #!/bin/bash LOG=/var/tmp/log #... exec > $LOG 2>&1 my target is to write to $LOG on any standard output and standard err…
shalom
  • 451
  • 12
  • 26
1
vote
2 answers

Issue with the combination of ssh, bash --login and exec

Here are few situations I'm in. foo is the ssh server to which password less login is set up. $ ssh foo $ bash --login -c 'exec $0 "$@"' ls -lrt It's working as expected. ssh foo bash --login -c ls -lrt This is not working as expected. Only ls is…
RatDon
  • 169
  • 1
  • 1
  • 6
1
2 3 4