1819914 Members
1961 Online
109607 Solutions
New Discussion юеВ

Permissions Question

 
SOLVED
Go to solution
Keith Johnson
Valued Contributor

Permissions Question

This is fairly simple probably, but I'm in a time crunch. What are the chmod parameters necessary to set permissions on a file to

-r-s--S---

I've browsed the man pages for chmod but haven't been able to find the right combination. Thanks!
No matter where you go...there you are.
6 REPLIES 6
Peter Godron
Honored Contributor
Solution

Re: Permissions Question

Keith,
search for 'sticky bit' ans set user id
example:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=103855

man chmod
"Assign read and execute permission to everybody, and set the set-user-ID bit:

chmod a=rx,u+s file"

So for you:
chmod u=r+s,g+s file

If the answer given was useful, please reward with points:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Yang Qin_1
Honored Contributor

Re: Permissions Question

Hi, try

chmod 6500 file

Yang
Coolmar
Esteemed Contributor

Re: Permissions Question

chmod 400
chmod u+sx,g+s

HTH,
S.
Keith Johnson
Valued Contributor

Re: Permissions Question

They're all good. Thanks much!!

KJ
No matter where you go...there you are.
Keith Johnson
Valued Contributor

Re: Permissions Question

Closing thread.
No matter where you go...there you are.
Kevin Wright
Honored Contributor

Re: Permissions Question

lower case s is setuid bit is set, 4 for 4th bit
capital S is sgid but execute is not set for gid. But that would be 2 for the 4th bit.

BTW, sticky bit is 1 for 4th bit, and represents a t. T if others execute is not set.