Linux: Set permission only to directories

后端 未结 6 1844
盖世英雄少女心
盖世英雄少女心 2021-01-30 07:07

I have to change the permissions of the htdocs directory in apache to a certain group and with certain read/write/execute.

The directories need to have 775

6条回答
  •  星月不相逢
    2021-01-30 07:43

    Use find to search for directories and apply chmod on them:

    find -type d | xargs chmod 775
    

    Use type f for file:

    find -type f | xargs chmod 775
    

提交回复
热议问题