linux - Perl script not found when on a shared mounted hard drive located on a Windows computer -
i'm working on linux mint 17.1 rebecca 64 bits.
i have simple perl script named test.pl :
#!/usr/bin/perl print "hello\n" ;
permissions -rwxr-xr-x
my path variable : /mnt/users/user1/:/home/mylogin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
when script in user bin directory /home/mylogin/bin, can launch outside bin directory simple :
test.pl
the command :
which test.pl
return
/home/mylogin/bin/test.pl
that seems ok.
on linux mount shared windows hard drive located somewhere on local network. if move script windows mounted hard drive on /mnt/users/user1/ can't run anymore if /mnt/users/user1/ in $path variable. system answers "command not found". if go directory cd command, can't launch script simple :
test.pl
the error "command not found".
if try :
./test.pl
the error "permission denied"
if try :
perl test.pl
it works perfectly... what's wrong ??? thanx
the error "command not found".
when type command without explicit path (unlike ./test.pl
) shell search directories listed in $path
. not typically include ./
(the current directory), doesn't find script.
the error "permission denied"
when try execute script directly (as opposed executing perl
, passing location of script argument, file permissions must allow execution.
windows file permissions not unix file permissions , windows formatted disk mounted on unix-like systems typically have hard coded (in mount command) file permissions. these not include execution permission file want execute.
Comments
Post a Comment