I’m trying to set permissions/ownership on either directories or files, recursively within a given directory, without changing the other.
E.g. I have directory /web where I want to set all the directories to 775, but the files to 664.
Is there a way to do this easily?
$ find /path/to/directory -type f -print0 | xargs -0 chmod 664
$ find /path/to/directory -type d -print0 | xargs -0 chmod 775
- Find and delete all but N largest files in 100s of directories
- Change user permissions on files/directories where user = fred recursively
- chmod all files (including hidden files) in a directory in Linux (not recursively)
- How to make apache create files with certain permissions?
- how to change permissions of specific file type
Leave a comment
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?
- Can Windows RDC admin users be immune from being kicked?