4创建文件,并赋予权限611(两种方式,一种guoa,一种nnn)
[root@Myliunx ~]
[root@Myliunx ~]
-rw-r--r-- 1 root root 0 Jul 21 20:45 file1
[root@Myliunx ~]
[root@Myliunx ~]
chmod: invalid mode: ‘u+r,w’
Try 'chmod --help' for more information.
[root@Myliunx ~]
chmod: cannot access 'g+x': No such file or directory
chmod: cannot access 'o+x': No such file or directory
[root@Myliunx ~]
[root@Myliunx ~]
-rw---x--x 1 root root 13 Jul 20 10:59 file
5.创建目录,并赋予权限755(两种方式,一种guoa,一种nnn)
[root@Myliunx ~]
mkdir: cannot create directory ‘file1’: File exists
[root@Myliunx ~]
[root@Myliunx ~]
[root@Myliunx ~]
total 0
[root@Myliunx ~]
drwxr-xr-x 2 root root 4096 Jul 22 00:02 file3
[root@Myliunx ~]
6.创建文件,并将文件的属主和属组修改其他用户
[root@Myliunx ~]
user1
[root@Myliunx ~]
chown: invalid user: ‘user:user’
[root@Myliunx ~]
chown: invalid user: ‘use1r:user1’
[root@Myliunx ~]
[root@Myliunx ~]
-rw---x--x 1 user1 user1 13 Jul 20 10:59 file
[root@Myliunx ~]
7.设置suid,为文件设置suid(两种方式 u+s和nnnn)的方式
[root@Myliunx ~]
drwxr-xr-x 2 root root 4096 Jul 22 00:02 file3
[root@Myliunx ~]
-rw---x--x 1 user1 user1 13 Jul 20 10:59 file
[root@Myliunx ~]
[root@Myliunx ~]
-rwsrwxrwx 1 user1 user1 13 Jul 20 10:59 file
8.设置sgid, 为文件设置sgid(两种方式 g+s和nnnn)的方式
[root@Myliunx ~]
[root@Myliunx ~]
-rwsrwsrwx 1 user1 user1 13 Jul 20 10:59 file
9.设置sbit,为目录设置sbit(两种方式 o+t和nnnn)的方式
[root@Myliunx ~]
drwxr-xr-x 2 root root 4096 Jul 22 00:02 file3
[root@Myliunx ~]
[root@Myliunx ~]
[root@Myliunx ~]
d--------T 2 root root 4096 Jul 22 00:02 file3
10.创建文件,查询文件的acl
[root@Myliunx ~]
user::rw-
group::r--
other::r--
为文件设置acl 用户为testuser1 权限为 rwx
[root@Myliunx ~]
为文件设置acl的mask: 权限为r-x
[root@Myliunx ~]