linux - Perl script in cgi-bin not executing shell script with arguments -
My Perl script is present in CGI-bin / relation: There is a problem in this snippet of code: < Pre> I do not understand why this is happening, Apache server is used. File permissions for Perl script are If I can call Shell Script without arguments, then why is this issue when I call with arguments? The script is not said at all. The script has added a print that writes in the I just found out that if I remove the redirect, then it works fine, then the system works fine (". / Upd_test.sh $ res_file $ label"), but I redirect the logs I want to do because it is very important for my work. The current working directory is not your CGI script, so its use / will not work. Try using FindBin () to get the directory or just the full path to the updcode_sht script. But ... the system () is running from CGI scripts (hence, actually from web page) is dangerous. system ("./ upd_test.sh $ res_file $ label> log / upload log2 & amp; 1 & amp; - & gt; system does not work (" ./ upd_test .sh "); - & gt; works fine
-rwxr-xr-x 1 root Apache1935 Oct File permissions for Shell Script
/ tmp space whether it is executed or not.
Comments
Post a Comment