1、新建目录要求如下:
1)/pub目录为公共存储目录对所有用户可以读,写,执行,但用户只能删除属于自己的文件(t权限)
[root@localhost ~]# mkdir /pub
[root@localhost ~]# chmod 777 /pub
[root@localhost ~]# chmod o+t /pub
[root@localhost ~]# ll -d /pub
drwxrwxrwt. 2 root root 6 Jun 19 06:47 /pub
2)/sc目录为生产部存储目录只能对生产部人员可以写入,并且生产部人员该目录所建立的文件都自动归属到shengchan
[root@localhost ~]# mkdir /sc
[root@localhost ~]# chown :shengchan /sc
[root@localhost ~]# chmod g+w.g+s /sc
[root@localhost ~]# ll -d /sc
drwxrws---. 2 root shengchan 6 Jun 19 06:52 /sc
[root@localhost ~]#
3)/cw目录为财务部存储目录只能对财务部人员可以写入并且财务部人员所建立的文件都自动属于caiwu组中
[root@localhost ~]# mkdir /cw
[root@localhost ~]# chgrp caiwu /cw
[root@localhost ~]# chmod g+w.g+s /cw
[root@localhost ~]# ll -d /cw
drwxrws---. 2 root caiwu 6 Jun 19 06:55 /cw