首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在用适当的perssimions重新装入之后,我仍然无法在NTFS分区上运行脚本?

为什么在用适当的perssimions重新装入之后,我仍然无法在NTFS分区上运行脚本?
EN

Ask Ubuntu用户
提问于 2016-06-01 07:32:24
回答 1查看 220关注 0票数 1

我在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

重新装入磁盘。

在此之后,权限变成:

代码语言:javascript
复制
-rwxr-xr-x 1 scw4750 scw4750 32  6月  1 14:45 test.sh*

但是,当我使用>>./test.sh运行test.sh时

它返回:

代码语言:javascript
复制
bash: ./test.sh: Permission denied

为什么会发生这种事?如何解决这个问题?谢谢。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2016-06-01 09:41:52

正如mount手册中所指出的,user挂载选项也隐式地打开了noexec选项。

代码语言:javascript
复制
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).

哪里

代码语言:javascript
复制
noexec Do  not  allow  direct  execution of any binaries on the mounted
       filesystem. 
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/780233

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档