> -----Original Message-----
> From: mel awaisi [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 05, 2003 2:11 PM
> To: [EMAIL PROTECTED]
> Subject: Script does not want to run, error
> 
> 
> Hi,
> 
> I am having problems opening this script on my machine. i 
> have been getting 
> help from a very helpful person on this list.
> 
> I have checked the shebang line, that perl exists, and perl 
> -v gives proper 
> output.
> 
> i try to run the script below as follow:
> 
> [EMAIL PROTECTED] httpd]# cd cgi-bin
> [EMAIL PROTECTED] cgi-bin]# ls -la
> total 28
> drwxr-xr-x    2 me       root         4096 Mar  5 21:49 .
> drwxr-xr-x    5 me       root         4096 Mar  3 01:50 ..
> -rwxr-xr-x    1 me       root          268 Mar  4 13:50 printenv
> -rwxr-xr-x    1 me       me           1792 Mar  5 15:20 renamer
> -rwxr-xr-x    1 me       me           1788 Mar  4 16:40 renamer.cgi
> -rw-------    1 root     root         1731 Mar  5 21:49 renamer.pl
> -rwxr-xr-x    1 me       root          757 Mar  3 01:50 test-cgi
> [EMAIL PROTECTED] cgi-bin]# renamer.pl &
> [1] 10254
> [EMAIL PROTECTED] cgi-bin]# bash: renamer.pl: command not found
> 
> [1]+  Exit 127                renamer.pl

This is happening because root usually does not have the current directory
in the PATH for security reasons.  You did try the correct ./renamer.pl
syntax below.

> [EMAIL PROTECTED] cgi-bin]#
> 
> 
> [EMAIL PROTECTED] cgi-bin]# ./renamer.pl &
> [1] 10297
> [EMAIL PROTECTED] cgi-bin]# bash: ./renamer.pl: Permission denied

This is because the permissions shown
-rw-------    1 root     root         1731 Mar  5 21:49 renamer.pl
only allow read and write, but not execute.  

chmod 755 renamer.pl

will add read and executable permissions for all users to the file/program.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to