[NTLUG:Discuss] Why does nfs wreck shell scripts?

Lance Simmons lance at lsimmons.net
Thu Aug 22 07:49:05 CDT 2002


On Thu, Aug 22, 2002 at 12:04:24AM -0500, Chris Cox wrote:
> R. Jay Campbell wrote:
> >It may not be an nfs problem.  Are you sure the file "test" has
> >execute permissions? (-rwxr-xr-x)  

$ ls -l script
-rwxr-xr-x    1 lance    lance          29 Aug 22 07:40 script

$ cat script
#!/bin/sh
echo "test"
exit 0

$ ./script 
bash: ./script: /bin/sh: bad interpreter: Permission denied

$ sh ./script
test

$ ls -l /bin/sh
lrwxrwxrwx    1 root     root            4 Aug 21 22:56 /bin/sh -> bash

$ ls -l /bin/bash
-rwxr-xr-x    1 root     root       579816 Aug  2 13:03 /bin/bash

> Make sure you are not trying to execute as root, unless your are
> allowing root to execute across NFS (which is generally a bad
> idea).

$ whoami
lance

-- 
 .~.
 /V\   Lance Simmons
/( )\  lance at lsimmons.net
^^-^^




More information about the Discuss mailing list