我使用 Windows 双启动,并且创建了共享 ntfs 分区。我从 github 克隆了一个项目,使用 make 编译它,但似乎它不被识别为可运行。我已添加正确的权限并尝试更改目录的所有者。这是 ls -l 的输出:
total 298
-rwxrw-rw- 1 federicop federicop 375 ago 13 00:37 CLOSE.c
-rwxrw-rw- 1 federicop federicop 1015 ago 13 00:37 CommandsHandler.c
-rwxrw-rw- 1 federicop federicop 296 ago 13 00:37 CONFIG
-rwxrw-rw- 1 federicop federicop 5483 ago 13 00:37 Config.c
-rwxrw-rw- 1 federicop federicop 430080 ago 13 00:37 core
-rwxrw-rw- 1 federicop federicop 886 ago 13 00:37 Error.c
-rwxrw-rw- 1 federicop federicop 1774 ago 13 00:37 Heartbeating.c
drwxrw-rw- 1 federicop federicop 4096 ago 13 00:37 inc
-rwxrw-rw- 1 federicop federicop 346 ago 13 00:37 makefile
-rwxrw-rw- 1 federicop federicop 5530 ago 13 00:37 OPE.c
-rwxrw-rw- 1 federicop federicop 0 ago 13 00:37 output.txt
-rwxrw-rw- 1 federicop federicop 3157 ago 13 00:37 READ.c
-rwxrw-rw- 1 federicop federicop 37 ago 13 00:37 Run.sh
-rwxr-xr-x 1 federicop federicop 47486 ago 13 08:21 Server
-rwxrw-rw- 1 federicop federicop 3323 ago 13 00:37 server.c
-rwxrw-rw- 1 federicop federicop 7218 ago 13 00:37 StruttureDati.c
drwxrw-rw- 1 federicop federicop 0 ago 13 00:37 TestDIR
-rwxrw-rw- 1 federicop federicop 2186 ago 13 00:37 Utils.c
我需要运行服务器,我的用户是 federicop。该目录位于 /media/federicop/Data 中,我的 fstab 中有这一行:
UUID=82440D36440D2F0B /media/federicop/Data ntfs-3g auto,users,permissions 0 0
如果我尝试运行它,我会收到错误:
./Server
bash: ./Server: Permission denied
答案1
可能您的 NTFS 卷是通过选项安装的noexec
,这是permissions
.man ntfs-3g
详情请参阅。
您可以exec
通过将其添加到 来选择性地启用选项fstab
。
UUID=82440D36440D2F0B /media/federicop/Data ntfs-3g auto,users,permissions,exec 0 0
运行grep /media/federicop/Data /proc/mounts
以了解实际应用的安装选项。