What are setuid/setgid in relation to file permissions?

Answers were Sorted based on User's Feedback



What are setuid/setgid in relation to file permissions?..

Answer / chinavenkanna babu

setuid:When setuid permission is set to an executable
file,if the user runs this executable file he is granted
access based on the owner of the file instead of who
started an executable file.we can set the setuid permission
on file # chmod 4555 executable_file

setgid:when setgid permission is set to the file in a
directory,the file belongs to the same group in which the
directory is a member.we can set the setgid permission on
file # chmod 2555 executable_file

Is This Answer Correct ?    13 Yes 7 No

What are setuid/setgid in relation to file permissions?..

Answer / p kumar

Setuid:If it is set on an executable file,cause it to run
under the user...
For example:/etc/passwd file is owned by root whici have
only read permision .....It will store all uaers encrypted
password..but users can still change their passwprd using
#passwd command ,,,bcz set uid bit is set for this file,,,
#ls -l /etc/passwd====it will show -wr--------s
#chmod u+s dirname

Stickybit:If it is set on a directory only the owner of a
file can delate the file.......only 4 directories...
/tmp dir iset by sticky bit....bcz any users can create &
delete file....but 2 prevent users from deleting each
others file...
#chmod o+t dirname....

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Unix AllOther Interview Questions

I am new to Unix and Unix Shell scripting could you guide me on how to go about these subjects and where to start from with concern to Oracle?. I also would like to know where does UNIX shell Scripting help in terms of development of a application in Oracle? I have no clue in the subject so do help me. Thank You Neelima

0 Answers  


What is file system in UNIX?

6 Answers   BMC,


System A can contact system B, but not in reverse, not firewall, not tcp wrappers, what is the reason ?

2 Answers  


What are permissions in UNIX?

5 Answers   BMC, University,


What is FTP?

5 Answers   BMC,






Give the command to display space usage on the UNIX file system.

6 Answers  


The very first process created by the kernal that runs till the kernal process is haltes is

6 Answers   IBM,


What are the mount and unmount system calls?

1 Answers   HCL,


in unix profile contains

1 Answers   BFL,


What is the main advantage of creating links to a file instead of copies of the file?

5 Answers   Cisco, ING,


How to recover a system whose root password has lost?

5 Answers   SoftNet,


very first process created by kernell?

4 Answers   TCS,


Categories