Questions tagged [exec]

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

53 questions
1
vote
3 answers

Error: Impossible to define SCIHOME environment variable

I am trying to use Scilab through PHP on my server like described in this document. I am running Ubuntu 16.04. I have an Apache server running. I installed Scilab with apt-get install scilab. I can successfully write scilab code like: scilab -nwni…
Sharcoux
  • 179
  • 2
  • 10
1
vote
1 answer

Call java binary from PHP not possible

Hi I would like to call java using PHP exec() function but it fails (no output of e.g. exec('/usr/bin/java -version'). I am running apache with PHP as Fast-CGI (with fcgid) on debian wheezy. The java binary is available under /usr/bin/java and is…
1
vote
0 answers

PHP exec() Returns 127 When Trying To Run Any Command

I'm an intermediate Linux user (CentOS, some Debian) who is transitioning to FreeBSD (10). Permissions have always been somewhat confusing to me. I've set up a server with PHP-FPM (5.6) and Nginx (1.8.0). They run as the 'www' user. Any command I…
AndyMac
  • 11
  • 1
  • 2
1
vote
2 answers

Why perl backticks don't see anything past the first space?

I have a command $output = `somecommand parm1 parm2`; When I try to run this perl script I get. Can't exec "somecommand" at ..... It seems it is not seeing anything past the first space in between the `` I have a friend who runs this in a…
1
vote
1 answer

php-fpm does not work me exec or shell_exec

I have OpenBSD 5.6 and php-fpm, nginx. Is chrooted by default on /var/www I try:(test.php) "; if( ini_get('safe_mode') ){ …
laur
  • 127
  • 1
  • 4
1
vote
3 answers

Limit Exec Commands for Linux Users

How can I limit the scope of executable commands a linux user can run? For example, I only want user to be able to run the ls command and nothing else. If tried, for example to run cat, linux would throw an error or return null. I've looked into…
1
vote
1 answer

Results of not using '{}' in find /mnt/tmp -atime +91 -exec rm -f {} \;?

I have been using the following code for the longest on a system I took over: find /mnt/tmp -atime +91 -exec rm -f {} \; However, researching further I see everyone saying the curly braces should be enclosed in single quotes like below: find…
Damainman
  • 1,045
  • 5
  • 16
  • 26
1
vote
1 answer

How do I exec finger with puppet?

My puppet file looks like this: # Test finger harry harry.pp exec {'harryd': command => "/usr/bin/finger $title", …
Son of the Wai-Pan
  • 757
  • 4
  • 11
  • 25
1
vote
1 answer

ip netns exec permission denied

I have a php script, say file.php that contains: If I run file.php via the command line, as root, it works. However, when I run it via apache, www-data doesn't have the permissions to use ip netns exec,…
Bryan Lemon
  • 11
  • 1
  • 3
1
vote
1 answer

Solaris 10 snmp exec multiple strings

I am trying to use snmp to query a directory listing. I have added the exec line to snmp.conf ("exec list /bin/ls /pathtodirectory") and restarted the service. When I perform an snmp walk for the exec OID I can see the string returned by the exec,…
ztnewman
  • 31
  • 1
  • 1
  • 3
1
vote
1 answer

Need to execute script file using sudo - run from teamcity

I need to execute a script in Linux platform "runme.sh" (which can be executed as sudo user) using another ant script "build.xml". Now i have execute this build.xml from teamcity. I have code for everything but got struck into while invoking…
coolgokul
  • 19
  • 1
  • 2
1
vote
1 answer

ffmpeg fails inside PHP exec();

I am trying to get info from a file with ffmpeg, if inside php I have this code: exec("ffmpeg -i ffmpeg_directory/4.flv"); Returns nothing, even tough same command inside SSH would print a large list of file info (fps, duration, etc). But this…
adrianTNT
  • 1,077
  • 6
  • 22
  • 43
1
vote
2 answers

Is it ok for php sites running Magento to have the exec function enabled?

We offer a service for Magento sites that requires installation of a Magento extension. For large sites, this extension needs to run a background process which requires the exec function. Our developer claims that it is reasonable to ask our…
lkview
0
votes
1 answer

using find, exec and cp to copy specific files while preserving directory path

I set up the following folders with empty text files: 1/a.txt 2/b.txt I want to copy only txt files to another directory while maintaining their directory structure. So I tried the following commands: mkdir -p temp/s; find ./ -name '*txt' -exec cp…
John
  • 7,343
  • 23
  • 63
  • 87
0
votes
0 answers

Influxdb is not showing up the measurement name which is pushed by collectd exec plugin

Am using collectd to collect the system metric and pushing into influx db. To monitor the running process I wrote a script leveraged the collectd exec plugin to push my custo m metric into influx db... My script for exec plugin is…