![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to change permissions in a certain directory? | praveen_indramo | UNIX for Dummies Questions & Answers | 1 | 03-25-2008 09:07 AM |
| Directory Default Permissions | prvnrk | UNIX for Advanced & Expert Users | 4 | 10-18-2007 09:22 PM |
| permissions of a directory | smehra | UNIX for Dummies Questions & Answers | 3 | 06-04-2006 07:32 AM |
| determine owner directory permissions from within the directory | Sniper Pixie | Shell Programming and Scripting | 4 | 03-07-2006 02:06 PM |
| directory permissions and CHMOD | ncarmstrong | UNIX for Dummies Questions & Answers | 3 | 08-14-2002 10:00 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Recusive Directory Permissions with Spaces
Ok, I think it would be wise to begin with the scenario.
I've got a server that has a template directory structure containing 7 folders. Some folders will need permissions set one way, and other set another way. That's the easy part using: chmod -R 755 * ;This used first to cover majority To change permissions on specific directories, I've used the following: find ./ -type d -name dirname | xargs chmod 775 Works great until I have a directory with a space. IE:"Print Production" I've done the following and successfully found such directories with: find ./ -type d -name Print*' '*Production -print Tried running this to change permissions: find ./ -type d -name Print*' '*Production | xargs chmod 775 This is what I get in response to running the command: chmod: .//YOU99752/YOU/20681/Print: No such file or directory chmod: Production: No such file or directory As you can see here, it seems to be trying to apply permission to "Print" and "Production" subdirectories. I can chmod in the root folder for "Print Production and change permissions, but with over 6000+ subdirectories, I really don't have the time (or patience) to go through each directory as would anyone. Any help would be appreciated. Thanks JB |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Does this help? Worked for me.
Code:
find . -type d -name "Print\ Production" -exec chmod -R 775 '{}' \;
|
|
#3
|
|||
|
|||
|
Perfectly!
Thanks, -JB |
|||
| Google The UNIX and Linux Forums |