Results 1 to 10 of 14
Hi,
So I am pretty sure it's something I did when I reformatted my new drive to ext3, but it seems that I can no longer run script files by ...
- 09-22-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 6
shell scripts stopped running when called xxx.sh
Hi,
So I am pretty sure it's something I did when I reformatted my new drive to ext3, but it seems that I can no longer run script files by just calling them:
the shbang is correct, and I've tried it as both root and a normal user.Code:# ./test.sh bash: ./test.sh: /bin/sh: bad interpreter: Permission denied
It does run if I do:
/etc/fstab for that drive says:Code:# ./sh test.sh
I know it's gotta be something simple, but I'm at a lossCode:/dev/disk/by-id/scsi-SATA_ST9120821A_5PL0Q6K0-part6 /data ext3 user,acl,user_xattr
Any help is appreciated
- 09-22-2008 #2
I don't know much about extended attributes or ACLs, but I notice that you have both enabled for this filesystem, and that does worry me a bit.
Can you run the command "getfacl /path/to/file" for the affected shell script? This will display the ACL for the file, and we can see if that is preventing you from executing it.DISTRO=Arch
Registered Linux User #388732
- 09-22-2008 #3Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
I would guess the shell scripts are not executable.
Code:chmod 755 /path/file.sh
- 09-22-2008 #4Just Joined!
- Join Date
- Sep 2008
- Posts
- 6
The script is executable (actually, I had made it world r/w/x just to see if it was something along those lines)
Code:# getfacl ./test.sh # file: test.sh # owner: nitehawk # group: users user::rwx group::rwx other::rwx
- 09-22-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
- 09-22-2008 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 6
tnxCode:# ls -l /bin/sh lrwxrwxrwx 1 root root 4 Jul 30 01:07 /bin/sh -> bash
- 09-22-2008 #7Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
- 09-22-2008 #8Just Joined!
- Join Date
- Sep 2008
- Posts
- 6
Code:# ls -l /bin/bash -rwxr-xr-x 1 root root 663704 2008-06-06 16:04 /bin/bash
- 09-22-2008 #9Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
That seems right as well. Strange.
Well, a couple of things you can try:
- Boot from a livecd and fsck your disk, to see if there's disk corruption.
- Double check your script and the shabang, maybe there's some odd character on that line that the editor is not displaying, so check in many editors.
- 09-22-2008 #10Just Joined!
- Join Date
- Sep 2008
- Posts
- 6


Reply With Quote
