Why do I get a permission denied from a script ?
Hello,
Why do I get a permission denied from a script ? Thanks Glenn Using openSUSE 12.1 64 bit Sequence of steps: # id uid=0(root) gid=0(root) groups=0(root) # ll total 8 drwxr-xr-x 2 root root 40 Nov 23 14:09 disk drwxr-xr-x 2 root root 40 Nov 23 14:09 disk2 -rwx------ 1 root root 29 Nov 23 14:22 off -rwx------ 1 root root 39 Nov 23 17:20 on # cat on #!/bin/sh mount /dev/sdb6 /media/disk # chmod 700 on # ./on bash: ./on: Permission denied # dmesg . . . [ 2858.804066] REISERFS (device sdb6): found reiserfs format "3.6" with standard journal [ 2858.804111] REISERFS (device sdb6): using ordered data mode [ 2858.817790] REISERFS (device sdb6): journal params: device sdb6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 2858.819147] REISERFS (device sdb6): checking transaction log (sdb6) [ 2858.874905] REISERFS (device sdb6): Using r5 hash to sort names |
Try 755 instead.
|
Quote:
I tried creating a script with 700 perm and was able to execute it. |
Auto-mounting of file systems under /media typically includes the "noexec" option. Try
Code:
mount -o remount,exec /media/disk Code:
sh ./on |
try moving the script to your home directory.
i never have figured out why but scripts won't run from a disk like that. |
All times are GMT -5. The time now is 11:51 PM. |