bash: /bin/myscript: 权限被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19082023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 08:06:02  来源:igfitidea点击:

bash: /bin/myscript: permission denied

linuxbashubuntu

提问by erbal

I've added my folder's path to the bashrc, in linux mint 15. Which contains my scripts. My scripts supposed to work like the bash scripts, as I know. But every time I try to use one of my scripts the following error appears: bash: /bin/myscript: permission denied

我已经在 linux mint 15 中将我的文件夹路径添加到 bashrc 中。其中包含我的脚本。据我所知,我的脚本应该像 bash 脚本一样工作。但是每次我尝试使用我的脚本之一时都会出现以下错误:bash: /bin/myscript: permission denied

And this is the export line:

这是导出行:

export PATH=$PATH:/home/peter/myscripts/

I logged in as root.

我以 root 身份登录。

回答by Alfe

You might have forgotten to give your scripts execution permissions:

您可能忘记授予脚本执行权限:

chmod a+x /path/to/the/script