The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Root cannot change /home permission moe2266 UNIX for Dummies Questions & Answers 6 10-31-2007 07:19 AM
How to change the default permission of a file reachsamir UNIX for Dummies Questions & Answers 2 08-28-2007 02:57 PM
Permission Change Upon Reboot gross SUN Solaris 2 06-25-2007 08:34 AM
change permission chmod Minguccio75 UNIX for Advanced & Expert Users 2 11-30-2006 01:48 AM
Change permission for directories and files mingfei2006 Shell Programming and Scripting 1 08-23-2006 04:00 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-17-2008
Registered User
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 160
Permission change query

I need to change permission for a directory from drwxrwxrwx to drwxr--s--T

What chmod command will work?

What will be the number code to represent the required permission?
Reply With Quote
Forum Sponsor
  #2  
Old 07-17-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
The number is 3710 and
chmod 3710 dir
should work. Unless your chmod implements silly restrictions against this (as, I believe, Solaris does). In that case, cheat a little bit with...
perl -e 'chmod(03710, shift);' dir

Code:
$ chmod 0 file
$ perl -e 'chmod(03710,shift);' file
$ ls -l file
-rwx--s--T  1 bin  other  41 Jul 18 02:27 file
$
Reply With Quote
  #3  
Old 07-18-2008
Registered User
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 160
Thanks Perderabo. I've read many of your articles in this site. It would be good if you could write one about permissions (including handling s and t bits).

Thank You!
Reply With Quote
  #4  
Old 07-18-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Quote:
Originally Posted by krishmaths View Post
Thanks Perderabo. I've read many of your articles in this site. It would be good if you could write one about permissions (including handling s and t bits).

Thank You!
Ummm, that's a joke, right?


Unix File Permissions
Reply With Quote
  #5  
Old 07-19-2008
Registered User
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 160
Somehow I missed this one. Thank You!

You simply rock, Perderabo!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0