I found a thread on this forum telling me how to chmod directories separately from files.
find [YOURDIR] -type d | chmod 755 [files] \;
find [YOURDIR] -type f | chmod 644 [files] \;
In my case I want all subdirectories of the dir I'm in, to be 766, and all files must be 040 (long story why they need to be like this
I issued this command:
find ./ -type f | chmod -R 040 *
but instead of chmod'ing only the files, it alters everything; directories too.
What am I doing wrong? could it be the -R parameter of chmod?