Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

chmod 4000 and 4600

SOLVED
Go to solution
VEL_1
Valued Contributor

chmod 4000 and 4600


Generally to set sticky bit, we will use like:

# chmod 4100 test.txt
# ll test.txt
---s------ 1 root root 462 Jan 28 09:22 test.txt

# chmod 4700 test.txt
# ll test.txt
-rws------ 1 root root 462 Jan 28 09:22 test.txt

But in the following, What is "S" indicate in the sticky bit field??

# chmod 4000 test.txt
# ll test.txt
---S------ 1 root root 462 Jan 28 09:22 test.txt

# chmod 4600 test.txt
# ll test.txt
-rwS------ 1 root root 462 Jan 28 09:22 test.txt
4 REPLIES
Dexter Filmore
Honored Contributor
Solution

Re: chmod 4000 and 4600

I think the "S" indicates that the execute bit is not set, whereas the "s" in the first example indicates that the execute bit is set.

Claudio Cilloni
Honored Contributor

Re: chmod 4000 and 4600

"sticky"? I thought that the 's' bit means "superuser"...

ciao
Claudio
HGN
Honored Contributor

Re: chmod 4000 and 4600

Hi

#chmod 4000 sets the User ID on file execution
#chmod 2000 sets the group ID on file execution

so s gives the execute permission, so when u set a group to execute, the people in that group can all execute that file.
You can the passwd file each user can execute it to change his own passwd(that has user id on execution).

Rgds

HGN
Stuart Browne
Honored Contributor

Re: chmod 4000 and 4600

Claudio is right. 's' or 'S' is suid-execute, not sticky. 't' is sticky (1xxx or 'chmod +t').
One long-haired git at your service...