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
chmod
can actually do this itself; the X
symbolic permission means "execute, if it makes sense" which generally means on directories but not files. So, you can use:
chmod -R u=rwX,go=rX /path/to/htdocs
The only potential problem is that if any of the plain files already have execute set, chmod
assumes it's intentional and keeps it.