sh 的权限不正确

sh 的权限不正确

我遇到了权限方面的问题sh或可能存在权限方面的问题。

例如:我尝试使用yarn encore dev并收到错误响应:

yarn run v1.16.0
$ /media/user/app/node_modules/.bin/encore dev
/bin/sh: 1: /media/user/app/node_modules/.bin/encore: Permission denied
error Command failed with exit code 126.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

当我使用类似sh node_modules/.bin/encore dev响应仍然很糟糕

node_modules/.bin/encore: 2: node_modules/.bin/encore: /bin: Permission denied
node_modules/.bin/encore: 3: node_modules/.bin/encore: Dockerfile: not found
node_modules/.bin/encore: 4: node_modules/.bin/encore: Dockerfile: not found
node_modules/.bin/encore: 5: node_modules/.bin/encore: Syntax error: word unexpected (expecting ")")

./node_modules/.bin/encore dev也返回错误:

zsh: no access: ./node_modules/.bin/encore


特权:

里面node_modules/.bin/

lrwxrwxrwx   1 user user    40 cze  5 15:00 encore -> ../@symfony/webpack-encore/bin/encore.js

应用程序目录:

drwxrwxr-x 744 user user  24576 cze  5 15:01 node_modules

所有父母目录/media/user/app/直到/有一个0755。

fstab:

UUID=uuuuuuid /media/user/              ext4    errors=remount-ro,auto,exec,rw,user 0       0

有人知道什么问题或有什么建议吗?

答案1

man 8 mount

user  Allow  an  ordinary user to mount the filesystem. [...] 
      This  option  implies the options noexec, nosuid, and nodev
      (unless overridden by subsequent options, as in the option
      line user,exec,dev,suid).

您需要遵循exec以下步骤user才能使其有效。

相关内容