Green generally indicates an executable file because you added the executex bit to the file's mode. You cannot see the execution bit under other users because the execution x bit is also user-specific. In Unix, file user ownership is divided into user (U), group (G), and other (O). Each user can set read, write, execution and other modes respectively. If other users cannot see the executable, it means that there is no execution x bit under the other user. 执行x位。在其他用户下看不到执行位,是因为执行x位也是分用户的。在Unix中,文件用户所属分为user(U)、group(G)、other(O),每个用户所属下又可以分别设置读、写、执行等模式。出现其他用户看不到可执行,说明在other用户所属下没有执行x位。
通过-x可以去掉执行位,还可以更细分的操作u-xg-xo-x
chmod -x index.php
1楼通过设置10进制的数字也可以的。反过来,增加x可以+xu+xg+xo+x
You can remove the execution bit through -x, and you can also perform more detailed operations u-xg-xo-x
rrreee
On the first floor, you can also set decimal numbers. Conversely, increasing x can +xu+xg+xo+x code>. 🎜
🎜This area is still very basic, it is recommended to learn it systematically. 🎜
Just change the permissions of the file and execute
chmod 644 index.php
Green generally indicates an executable file because you added the
executex
bit to the file's mode. You cannot see the execution bit under other users because theexecution x
bit is also user-specific. In Unix, file user ownership is divided into user (U), group (G), and other (O). Each user can set read, write, execution and other modes respectively. If other users cannot see the executable, it means that there is noexecution x
bit under the other user.执行x
位。在其他用户下看不到执行位,是因为执行x
位也是分用户的。在Unix中,文件用户所属分为user(U)、group(G)、other(O),每个用户所属下又可以分别设置读、写、执行等模式。出现其他用户看不到可执行,说明在other用户所属下没有执行x
位。通过
-x
可以去掉执行位,还可以更细分的操作u-x
g-x
o-x
1楼通过设置10进制的数字也可以的。反过来,增加
You can remove the execution bit throughx
可以+x
u+x
g+x
o+x
-x
, and you can also perform more detailed operationsu-x
g-x
o-x
rrreee
On the first floor, you can also set decimal numbers. Conversely, increasingx
can+x
u+x
g+x
o+x code>. 🎜 🎜This area is still very basic, it is recommended to learn it systematically. 🎜
Green means the file has execution permission. If chmod -x filename removes the execution permission, it will no longer be green.
Removing the --color=auto after ls in alias will also work
You can also use the ls command like below