executing script with ./ does not work
I wrote a script:
Code:
#!/bin/bash Code:
me@mymachine:~$ ./hello Lotharster |
Go to the directory where the script is located and do chmod 700 ./hello
|
You do not have permission to run bash? Try to check the permissions of bash and chmod as necessary.
Brian |
Quote:
Code:
-rwxr-xr-x 1 root root 611K Dec 19 2004 /bin/bash Lotharster |
Very odd -- perhaps you wrote the script on a partition that's been mounted with the noexec flag? Check with the mount command or try moving the hello script to another directory (on a different partition)and run it again. it would help if you told us which distro and version you are using.
|
Quote:
This is the fstab entry of the partition. (It is a loop-aes-encrypted partion.) Code:
/dev/hda7 /mnt/crypted ext3 defaults,user,noauto,loop=/dev/loop0,encryption=aes128,itercountk=1000 0 0 |
Hmmm ... I don't see noexec in the fstab options. Maybe it's a side effect of it being an encrypted partition. I did a quick Google and didn't find anything relevant. I tried it on a normal, unencrypted loop filesystem and it worked fine. Unfortunately I don't have the necessary encryption built into my kernel to try that.
|
What does "loop=/dev/loop0" do? Could this be the source of the permission problem? (My /dev/loop0 is set at 660.)
Also, will the script run as root? Brian |
All times are GMT -5. The time now is 05:41 PM. |