xgqfrms-GitHub / Node-CLI-Tools

一个 Node.js CLI 工具,查看指定 git 仓库的 commit history ; 能对 commit history 进行搜索; 能查看指定时间范围的 commit history.
https://node-cli-tools.xgqfrms.xyz
MIT License
6 stars 2 forks source link

linux & chmod & 777 #24

Open xyzdata opened 5 years ago

xyzdata commented 5 years ago

linux & chmod & 777

https://github.com/xgqfrms-GitHub/Node-CLI-Tools/blob/master/bash-shell-chmod.md

xyzdata commented 5 years ago

https://www.cnblogs.com/xgqfrms/p/9546961.html

xgqfrms commented 5 years ago

chmod 777 === chomd +x

#!/bin/sh

# echo "^-v-^ JSON DB is running in development env!" && npm run db

# echo "^-v-^ JSON DB is running in development env!" && nodemon -w ./server.js localhost 8888

JSONDB="nodemon -w ./server.js localhost 8888"

${JSONDB} &
# chmod +x db.sh
# sudo ./db.sh
# nodemon -w ./server.js localhost 8888

# /bin/sh db.sh

# ps -ef | grep node
# sudo kill -9 <PID>
xgqfrms commented 5 years ago

通过man查询可知:

$ man chomd

u 代表用户. 
g 代表用户组. 
o 代表其他. 
a 代表所有.

这意味着chmod u+x somefile 只授予这个文件的所属者执行的权限 而 chmod +x somefile 和 chmod a+x somefile 是一样的 Just doing +x will apply it to all flags: [u]ser, [g]roup, [o]thers.

xgqfrms commented 5 years ago

man chomd

MBP


xgqfrms-mbp:~ xgqfrms-mbp$ man chmod

             and entries will be removed regardless of their inherited state.

             If the user or group name contains spaces you can use ':' as the
             delimiter

             Example
              # chmod +a "User 1:allow:read" file

     =a#     Individual entries are rewritten using the =a# mode.

             Examples
              # ls -le
              -rw-r--r--+ 1 juser  wheel  0 Apr 28 14:06 file1
                owner: juser
                1: admin allow delete
              # chmod =a# 1 "admin allow write,chown"
              # ls -le
              -rw-r--r--+ 1 juser  wheel  0 Apr 28 14:06 file1
                owner: juser
                1: admin allow write,chown

             This mode may not be used to add new entries.

     -E      Reads the ACL information from stdin, as a sequential list of
             ACEs, separated by newlines.  If the information parses cor-
             rectly, the existing information is replaced.

     -C      Returns false if any of the named files have ACLs in non-canoni-
             cal order.

     -i      Removes the 'inherited' bit from all entries in the named file(s)
             ACLs.

     -I      Removes all inherited entries from the named file(s) ACL(s).

     -N      Removes the ACL from the named file(s).

COMPATIBILITY
     The -v option is non-standard and its use in scripts is not recommended.

SEE ALSO
     chflags(1), fsaclctl(1), install(1), chmod(2), stat(2), umask(2), fts(3),
     setmode(3), symlink(7), chown(8), mount(8), sticky(8)

STANDARDS
     The chmod utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compat-
     ible with the exception of the perm symbol ``t'' which is not included in
     that standard.

HISTORY
     A chmod command appeared in Version 1 AT&T UNIX.

BSD                              July 08, 2004                             BSD
(END)
xgqfrms commented 5 years ago

chmod u+x & chmod +x

https://askubuntu.com/questions/29589/chmod-ux-versus-chmod-x

https://en.wikipedia.org/wiki/Chmod

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa500/chmod.htm

https://stackoverflow.com/questions/18596778/difference-between-using-chmod-ax-and-chmod-755

https://serverfault.com/questions/189627/i-just-did-a-chmod-x-chmod

xgqfrms commented 5 years ago

https://chmodcommand.com/chmod-777/