Linux: Set permission only to directories

后端 未结 6 1836
盖世英雄少女心
盖世英雄少女心 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 08:03

    I use something similar to the solution provided by Gordon:

    chmod -R ug=rw,o=r,a+X /path/to/folder/
    

    It should always set 775 for folders and 664 for files, even if the execute permission was previosly set for some file

提交回复
热议问题