码迷,mamicode.com
首页 > 系统相关 > 详细

解决linux的-bash: ./xx: Permission denied

时间:2018-02-16 15:19:19      阅读:302      评论:0      收藏:0      [点我收藏+]

标签:10个   origin   接下来   pos   linux   pad   ora   col   float   

转载 2018-02-16 15:08:42

用于学习

在linux下执行sh文件时提示下面信息:

-bash: ./xx.sh: Permission denied


解决方案 chmod 777 xx.sh

 

Linux chmod +755和chmod +777 各是什么意思呢?

755 代表用户对该文件拥有读,写,执行的权限,同组其他人员拥有执行和读的权限,没有写的权限,其他用户的权限和同组人员权限一样。
777代表,user,group ,others ,都有读写和可执行权限。

 

在linux终端先输入ls -al,可以看到如:
   -rwx-r--r-- (一共10个参数)
第一个跟参数跟chmod无关,先不管.
2-4参数:属于user
5-7参数:属于group
8-10参数:属于others
接下来就简单了:r==>可读 w==>可写 x==>可执行
               r=4      w=2      x=1
所以755代表 rwxr-xr-x


 

解决linux的-bash: ./xx: Permission denied

标签:10个   origin   接下来   pos   linux   pad   ora   col   float   

原文地址:https://www.cnblogs.com/rookieDanny/p/8450216.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!