Change all files and folders permissions of a directory to 644/755

后端 未结 8 952
孤街浪徒
孤街浪徒 2020-12-04 04:20

How would I change all files to 644 and all folders to 755 using chmod from the linux command prompt? (Terminal)

相关标签:
8条回答
  • 2020-12-04 05:13

    This worked for me:

    find /A -type d -exec chmod 0755 {} \;
    find /A -type f -exec chmod 0644 {} \;
    
    0 讨论(0)
  • 2020-12-04 05:15

    Easiest for me to remember is two operations:

    chmod -R 644 dirName
    chmod -R +X dirName
    

    The +X only affects directories.

    0 讨论(0)
提交回复
热议问题