I use a mobile hard disk in ubuntu and I want to run scripts on the disk. At first, the permission is denied. Therefore, I followed the advices in this answer How do I use 'chmod' on an NTFS (or FAT32) partition? and use
sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000,uid=scw4750,gid=scw4750 /dev/sdf1 /media/Elements
to remount the disk.
After this the permission becomes:
-rwxr-xr-x 1 scw4750 scw4750 32 6月 1 14:45 test.sh*
However, when I run test.sh with >>./test.sh
It returns:
bash: ./test.sh: Permission denied
Why do this happens? How to solve it? Thanks.
bash scriptname.sh
rw
permissions, only read-write — not execute.