我在ubuntu中使用移动硬盘,我想在磁盘上运行脚本。一开始,该许可被拒绝。因此,我遵循了这个答案如何在NTFS (或FAT32 32)分区上使用“chmod”?中的建议并使用
sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000,uid=scw4750,gid=scw4750 /dev/sdf1 /media/Elements
重新装入磁盘。
在此之后,权限变成:
-rwxr-xr-x 1 scw4750 scw4750 32 6月 1 14:45 test.sh*但是,当我使用>>./test.sh运行test.sh时
它返回:
bash: ./test.sh: Permission denied为什么会发生这种事?如何解决这个问题?谢谢。
发布于 2016-06-01 09:41:52
正如mount手册中所指出的,user挂载选项也隐式地打开了noexec选项。
user Allow an ordinary user to mount the filesystem. The name of the
mounting user is written to mtab so that he can unmount the
filesystem again. This option implies the options noexec,
nosuid, and nodev (unless overridden by subsequent options, as
in the option line user,exec,dev,suid).哪里
noexec Do not allow direct execution of any binaries on the mounted
filesystem. https://askubuntu.com/questions/780233
复制相似问题