1831484 Members
3353 Online
110025 Solutions
New Discussion

Problem with permissions

 
SOLVED
Go to solution
Uli_3
Occasional Advisor

Problem with permissions

Hello everybody,
I have litte probelm with permissions, how can a create the following permissions with the chmod command:

r-sr-sr-t

Uli
8 REPLIES 8
Stefan Farrelly
Honored Contributor
Solution

Re: Problem with permissions

chmod 7555
Im from Palmerston North, New Zealand, but somehow ended up in London...
John Palmer
Honored Contributor

Re: Problem with permissions

chmod 7555

Regards,
John
Chris Wilshaw
Honored Contributor

Re: Problem with permissions

You should just need to use

chmod 7555

The 555 gives the r-x permissions for user/group/other, and the initial 7 gives suid permissions for user/group, and sets the sticky bit on the file

From the man page:

Miscellaneous mode bits:

4000 (= u=s) Set-user-id on file execution (file only)
2000 (= g=s) Set-group-id on file execution
1000 (= u=t) Set sticky bit; see chmod(2)
Rajeev  Shukla
Honored Contributor

Re: Problem with permissions

Try
chmod u+s,g+s,o+t filename


Rajeev
T G Manikandan
Honored Contributor

Re: Problem with permissions

#chmod a=rx,u+s,g+s,o+t
Robert-Jan Goossens
Honored Contributor

Re: Problem with permissions

Hi Uli,

#chmod 7555 file

Kind regards,

Robert-Jan.
Ravi_8
Honored Contributor

Re: Problem with permissions

Hi,

as root when a file is craeted it's permision will be
-rw-rw-rw- 1 root sys 11 Dec 11 14:46 ra
(ra is file name)
#chmod 0444 ra
#chmod a+s ra
#chmod o+t ra
now the file looks like
-r-Sr-Sr-T 1 root sys 13 Dec 11 14:42 ra
never give up
Uli_3
Occasional Advisor

Re: Problem with permissions

Thanks for help, I tried a lot of things with chmod and I thought I testes this, but maybe it is not a good day for me ...

regards Uli.