[Email protected]_2 ~]# lltotal268-RW-------.1Root root1090May3 the: *anaconda-ks.cfgdrwxr -xr-x. 3 root root 4096 may : backupdrwxr-xr-x2Root root4096May A A: -DESKTOPDRWXR-xr-x2Root root4096May A A: -DOCUMENTSDRWXR-xr-x2Root root4096May A A: -Downloads-rw-r--r--.1Root root8823May3 the: * Install. Log-rw-r--r--.1Root root3384May3 the: the Install. LOG.SYSLOGDRWXR-xr-x2Root root4096May A A: -Music-rw-r--r--1Root root210877The A -pdksh-5.2. --Panax Notoginseng. El5_8.1. X86_64.RPMDRWXR-xr-x2Root root4096May A A: -PICTURESDRWXR-xr-x2Root root4096May A A: -PUBLICDRWXR-xr-x.2Root root4096May4 Ten: -SCRIPTSDRWXR-xr-x2Root root4096May A A: -TEMPLATESDRWXR-xr-x2Root root4096May A A: -Videos
the user's permission to read the directory should be 5 (r-x) instead of 4 (r--), and x means that there is permission to execute the command under the directory.
[Email protected]_2 ~]# useradd backup[[email protected]_2~]# useradd jingy[[email protected]_2~]#su-Backup[[email protected]_2~]$IDUID=501(Backup) gid=503(Backup)groups=503(Backup) [[Email Protected]_2~]$ exitlogout[[email protected]_2~]#su-Jingy[[email protected]_2~]$IDUID=502(jingy) gid=504(jingy)groups=504(jingy) [[Email Protected]_2~]$ exitlogout[[Email protected]_2 ~]# usermod-a- G backup jingy[[Email protected]_2~]#su-Jingy[[email protected]_2~]$IDUID=502(jiongy) gid=504(jingy)groups=504(Jingy),503(Backup) [[Email Protected]_2~]$IDUID=502(jiongy) gid=504(jingy)groups=504(Jingy),503(Backup)
usermod-g backup Jingy #修改用户次要组信息
usermod-a-G backup jingy #将用户添加到新的次要组中
Linux command Notes (1)