【问题标题】:Linux: command to make folders recursively writable without affecting the permission of files inside themLinux:使文件夹递归可写而不影响其中文件权限的命令
【发布时间】:2013-12-06 22:25:03
【问题描述】:

是否可以使用 Linux 命令递归地使文件夹可写而不影响其中的文件。

chmod 777 -R foldername - 将使文件夹内的所有文件夹和文件可写。

我们有一个网站,我们不希望 php 框架的核心文件可写,但同时我们应该能够添加新文件。

【问题讨论】:

    标签: linux command-line cmd chmod


    【解决方案1】:

    你可以说:

    find foldername -type d -exec chmod 777 {} \;
    

    这只会更改目录的文件模式,而不是其中的文件

    【讨论】:

    • 非常感谢 devnull。祝你有美好的一天:) !!
    猜你喜欢
    • 1970-01-01
    • 2011-04-19
    • 2011-12-16
    • 1970-01-01
    • 2016-06-16
    • 1970-01-01
    • 2012-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多