|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > chmod g+s |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|