Linux设置文件夹及其所有子文件或文件夹的权限

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17250941/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:17:04  来源:igfitidea点击:

Linux set permission to a folder and all it's sub files or folders

linuxfedora

提问by Welcome Always

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

我正在使用 Fedora 和一个文件夹,我想将每个读写权限设置为 public

chmod -R 755 /directory
chmod owner group world FileName

and other's but can't work

和其他人但无法工作

how i can give public permission to every one one of my folder and every thing under it to other users

我如何向其他用户授予我文件夹中的每一个及其下的所有内容的公共权限

thanks

谢谢

采纳答案by abhishek verma

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 )

回答by Swapnil

use command chmod -R 777 yourdirectory

使用命令 chmod -R 777 yourdirectory