chmod directories recursively
Hey,
I have thousands of files and directories on my samba server. I changed all permissions (chmod) to <rwx> for owner and <r> for the rest. However, I want directories to be accessible to the rest of the users, for which I need to do: Code:
# chmod -R u=rwx,go=r * >> for files If there is no way around, what is the harm of setting <x> for any file in a samba server for any user? will it execute if called from windoze? Thanks! Mariano |
Hi,
You could use find: For files: find . -type f -exe chmod u=rwx,go=r {} \; For dirs: find . -type d -exe chmod u=rwx,go=rx {} \; This is done recursively from the dir you are in. Hope this helps. |
Code:
find -type f /var/blah/dir/ -exec chmod 744 {} \; |
That was easy !
Thanks! |
All times are GMT -5. The time now is 11:49 AM. |