Register
It is currently Wed Oct 01, 2014 2:10 am

REQ: Permissions script between directories & files.


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Wed Jan 24, 2007 9:22 pm   

Joined: Sat Dec 16, 2006 10:38 pm
Posts: 2
Here is the description:

I want to set a recursive CHMOD command of 777 to all directories under "/media/SMB"
At the same time I would like to set a recursive CHMOD command of 666 to all regular files also under "/media/SMB"

Can someone please create a script that will do this for me please?

In short, I want to set 777 permissions to directories only and 666 permissions to files only.

Thanks!


Top
 Profile  
 PostPosted: Thu Jan 25, 2007 2:22 am   
Site Admin

Joined: Tue May 17, 2005 7:31 pm
Posts: 251
Location: Georgia
Code:
find /media/SMB -type f -exec chmod 666 {} \;
find /media/SMB -type d -exec chmod 777 {} \;

something to that affect should work


Top
 Profile  
 PostPosted: Fri Jan 26, 2007 1:59 am   

Joined: Sat Dec 16, 2006 10:38 pm
Posts: 2
jbsnake wrote:
Code:
find /media/SMB -type f -exec chmod 666 {} \;
find /media/SMB -type d -exec chmod 777 {} \;

something to that affect should work


Thank you!

Finally got something that works.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP