1838134 Members
4452 Online
110124 Solutions
New Discussion

Re: stick bit /chmod

 
SOLVED
Go to solution
Jairo Campana
Trusted Contributor

stick bit /chmod

hello, I want change permisions to the file test and testone with result:
-r-sr-sr-x test

an -r-s--S--T testone
how would you write the command chmdod for assign these permissions


legionx
7 REPLIES 7
RAC_1
Honored Contributor

Re: stick bit /chmod

chmod 6555 test to get
-r-sr-sr-x test

chmod 7400 testone to get
-r-s--S--T
There is no substitute to HARDWORK
Patrick Wallek
Honored Contributor
Solution

Re: stick bit /chmod

# chmod 6555 test

# chmod 7500 testone
RAC_1
Honored Contributor

Re: stick bit /chmod

Slight correction for testone

chmod 7400 testone would give
-r-S--S--T

You want -r-S--S--T
co chmod 7500
There is no substitute to HARDWORK
Kevin Wright
Honored Contributor

Re: stick bit /chmod

the lower case s is in setuid/groupid when the execute bit is set, the capitol S is when execute is not set.
Geoff Wild
Honored Contributor

Re: stick bit /chmod

Yes - it is:

# chmod 6555 test
# # ll test
-r-sr-sr-x 1 root sys 0 Dec 17 12:16 test


# chmod 7500 testone
# ll testone
-r-s--S--T 1 root sys 0 Dec 17 12:17 testone


Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
jerry1
Super Advisor

Re: stick bit /chmod

chmod 6555 test
chmod 7500 testone

See man chmod.

I.Delic
Super Advisor

Re: stick bit /chmod

Hi,

Stick bit

chmod +t name_file


good luck

Idriz