LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to change the file mode to -rws--s--- (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-the-file-mode-to-rws-s-903269/)

ust 09-15-2011 09:34 PM

How to change the file mode to -rws--s---
 
I have a file that the file mode is -rws--s--- , I want to create a file that is the same mode as it , I tried chmod +s , but I changed to -rwSr-Sr-- , can advise what can i do ?

Thanks.

rootdev 09-15-2011 09:54 PM

Try chmod 6710 file

ust 09-15-2011 10:28 PM

Quote:

Originally Posted by rootdev (Post 4473093)
Try chmod 6710 file

Thx ,

it works ,

if set to this mode , does it mean only root can run it ?

grail 09-16-2011 12:07 AM

Root and whomever is in the group (second s) assigned to the file.

Also, should you need to find what to set a file to when you have an example file you can simply run stat on the example
and it will give you the numbers required.

chrism01 09-16-2011 01:05 AM

Actually,
Code:

-rws--s---
means

1. owner can read/write/execute and it will be run as owner
2. group can execute and it will run as group: actually, it'll prob run as owner anyway. normally g=s is used for shared dirs, a different concept.
3. other (world) none

https://secure.wikimedia.org/wikipedia/en/wiki/Setuid

ust 09-16-2011 02:11 AM

can not show time when rcp
 
Thanks.


All times are GMT -5. The time now is 02:40 AM.