linux 子文件夹赋权限_如何在Linux中设置文件夹和子文件夹的权限

本文提供了一种在Linux中更改和还原文件及目录权限的方法。介绍了如何将所有者设置为只读,如何允许组读取但不允许编辑,以及如何允许其他人阅读但不能编辑。同时,通过`find`命令演示了如何更改目录、文件及其扩展名的权限。
摘要由CSDN通过智能技术生成
linux 子文件夹赋权限

linux 子文件夹赋权限

During daily Linux administration we generally work generally with file and directory permissions. In this tutorial we will look different examples about how to change and revert Linux file and directory permissions. There is different ways to set folder and sub folder permission in Linux but here we will describe most convenient way.

在日常Linux管理中,我们通常通常使用文件和目录权限。 在本教程中,我们将查找有关如何更改和还原Linux文件和目录权限的不同示例。 在Linux中有多种设置文件夹和子文件夹权限的方法,但是在这里我们将描述最方便的方法。

只读所有者 (Read Only Owner)

Say we have folder /opt/lamp and we want to change all sub folders permission to change 600. Using <a href="https://www.poftut.com/linux-chmod-command-tutorial-examples-change-permission-files-folders/" target="_blank" rel="noopener noreferrer">chmod</a> with recursive options is the simplest one.

假设我们有/opt/lamp文件夹,并且我们想更改所有子文件夹的权限以更改600 。 使用<a href="https://www.poftut.com/linux-chmod-command-tutorial-examples-change-permission-files-folders/" target="_blank" rel="noopener noreferrer">chmod</a>具有递归选项是最简单的一个。

$ chmod -R 600 /opt/lamp

按组读取但未编辑 (Read By Group But Not Edited)

We may want to read by the owner group but not changed. We will set binary permission 660 for this.

我们可能想按所有者组进行阅读,但不要更改。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值