Linux——更改文件权限

  掌握目录及文件的权限设置,学会使用chmod以及chown,chgrp等命令的使用,以及更改权限的两种方法,文字设置法和数字设置法。

1Set the attributes of the file test1 as: the file owner (u) increases the execution authority, the user in the same group as the file owner (g) increases the execution authority, and other users (o) increase the execution authority. (A screenshot is required to verify whether the setting is successful)设定文件test1的属性为:文件属主(u)增加执行权限,与文件属主同组用户(g)增加执行权限,其他用户(o)增加执行权限。(需要截图验证是否设置成功)

2Set the attributes of the file test2 as follows: the file owner (u) increases the write permission, the user in the same group as the file owner (g) increases the write permission, and other users (o) deletes the write and execute permissions. (A screenshot is required to verify whether the setting is successful)设定文件test2的属性为:文件属主(u)增加写权限,与文件属主同组用户(g)增加写权限,其他用户(o)删除写、执行权限。(需要截图验证是否设置成功)

3Set the attributes of the file aaa as the file owner (u) has read and write permissions, the user in the same group as the file owner (g) has read permissions, and others (o) have read permissions. (Use the text setting method and the numerical setting method to set respectively)设定文件aaa的属性为文件属主(u)拥有读、写权限,与文件属主同组用户(g)拥有读权限,其他人(o)拥有读权限。(分别用文字设定法和数字设定法进行设定)

文字设定法

数字设定法

4 Set the attributes of the bbb file as: file owner (u) readable/writable/executable rights, users in the same group as the file owner (g) readable/executable rights, others (o) no any permissions. (Use the text setting method and the numerical setting method to set respectively)设定bbb这个文件的属性为:文件属主(u)可读/可写/可执行权,与文件属主同组用户(g)可读/可执行权,其他人(o)没有任何权限。(分别用文字设定法和数字设定法进行设定)

文字设定法

数字设定法

5verify when umask If it is 0 003 , what are the permissions of the files and directories created in this directory? ( need to create files and directories for verification)验证当 umask 为 0003 ,在该目录下创建的文件与目录权限分别为什么?(需创建文件和目录进行验证)

 

6the owner of file a to zhangsan .将文件a的所有者改成zhangsan。

7 Change the owner and group of file b to zhangsan .将文件b的所有者和所属的组都改成zhangsan。

8、综合应用题。Teacher XXX creates two directories t eacher and student in Linux. The t eacher directory is used for teachers to publish assignments, and the student directory is used for the function of students submitting assignments. Please set the permissions of these two directories.教师XXX在Linux中创建两个目录teacher和student,teacher目录用于教师发布作业,student目录用于同学们提交作业的功能,请设置好这两个目录的权限。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Apathfinder

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值