我在ubuntu中使用移动硬盘,并且想在该磁盘上运行脚本。首先,该许可被拒绝。因此,我遵循此答案中的建议如何在NTFS(或FAT32)分区上使用“ 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
为什么会这样?怎么解决呢?谢谢。
如mount
联机帮助页中所述,user
mount选项也隐式打开了该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.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句