Linux目录相关练习 redhat 8.5

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值