UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 1st, 2005, 02:54 AM
the_M the_M is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 the_M User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 30 sec
Reputation Power: 0
chmod g+s

Hi everybody
Does anyone have an idea why is not possible to set the gid bit on a directory using the octal mode (like: chmod 2755 /dir)?
The only way this works is by using the symbolic mode: chmod g+s /dir

Why? Where is the logic in that?

Reply With Quote
  #2  
Old April 1st, 2005, 04:58 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,402 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 10 h 26 m 59 sec
Reputation Power: 715
Probably depends on your OS. What are you using anyway? For the record, it works just fine for me on RedHat Linux 9. I could test it with BSDs as well and see what happens.
Code:
[root@ironmaiden foo]# mkdir bar
[root@ironmaiden foo]# ls -l
total 4
drwxr-xr-x    2 root     root         4096 Apr  1 03:05 bar
[root@ironmaiden foo]# chmod 02755 bar
[root@ironmaiden foo]# ls -l
total 4
drwxr-sr-x    2 root     root         4096 Apr  1 03:05 bar
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
  #3  
Old April 4th, 2005, 02:09 AM
the_M the_M is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 the_M User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 30 sec
Reputation Power: 0
chmod g+s

I am using Solaris. And here is what happens:

# mkdir test1
# chmod 2755 test1
# ls -ld test1
# drwxr-xr-x 2 root other ...
# chmod g+s test1
# ls -ld test1
# drwxr-sr-x 2 root other ...

It can be really tricky if one is not aware of this. I'm just trying to understand what is the reason for this limitation

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > chmod g+s


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway