Linux对文件夹及其所有子文件或文件夹设置权限 [英] Linux set permission to a folder and all it's sub files or folders

查看:837
本文介绍了Linux对文件夹及其所有子文件或文件夹设置权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用浅顶软呢帽和一个我想将权限设置为每读写一次的文件夹

i am using fedora and a folder i want to set permission public every one read write

chmod -R 755 /directory
chmod owner group world FileName

和其他人无法使用

我如何才能对我的文件夹中的每个文件夹及其下的所有内容授予公共权限

谢谢

推荐答案

以下两个命令将确保您的目的

Following two commands will ensure your purpose

chmod -R 755 /directory
chown -R owner.group /directory

这将向所有人授予读取权限.您可能会因所有权错误而面临问题.如果文件不是非常敏感,则还可以使用:

This will give read permissions to everyone. You may be facing issue due to wrong ownership. If the file is not very sensitive, you can also use:

chown -R nobody.nobody /directory   ( No body means anyone )

这篇关于Linux对文件夹及其所有子文件或文件夹设置权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆