How do suid permissions work?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How do suid permissions work?
# 1  
Old 05-03-2011
How do suid permissions work?

Hello all,

I have a file system with permissions:
Code:
drwxrwsr-x   49 pwcenter pwce1          4096 01 May 17:00 InFiles

Can someone explain the real significance of the 's' setting for group users please?

Cheers

Last edited by Yogesh Sawant; 05-08-2011 at 02:36 PM.. Reason: added code tags
# 2  
Old 05-03-2011
IT means that when anybody who is allowed to run the file, regardless of their current group, assumes the group id of the file - in other words you get the pwce1 group instead of your current group.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 05-03-2011
Please see my explanation in this thread, especially the 3rd post in the thread.
This User Gave Thanks to Perderabo For This Post:
# 4  
Old 10-29-2011
CPU & Memory

SUID bit doesn't work on scripts. I see most of the people set SUID bit on scripts.
SUID has some pros and cons, to know that check bellow link.
I hope it clears all your doubts.

UNIX/Linux Bash Shell Scripting: UNIX/Linux Advanced File Permissions - SUID,SGID and Sticky Bit
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

2. UNIX for Dummies Questions & Answers

Script without execute permissions will work for a user?

Please help me to understand the issue: Issue: There are shell scripts in a user home directory (/home/user_1) without execute permissions (rw-r--r--) to owner,group and world These shell scripts were able to execute/work previously but its not working now and it says permission denied or... (2 Replies)
Discussion started by: MSK_1990
2 Replies

3. Cybersecurity

the SUID of lpq

Hello My system is Debian-503-amd64. After I installed the "lpr" package, I found that some files with SUID bit come from this package. As: ls -l /usr/bin/lp* .... -rwsr-sr-x 1 root lp 31800 2008-05-20 /usr/bin/lpq -rwsr-sr-x 1 root lp 28504 2008-05-20 /usr/bin/lpr -rwsr-sr-x 1... (1 Reply)
Discussion started by: ZR_Lang
1 Replies

4. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <norbert@acodedb.com> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

5. UNIX for Dummies Questions & Answers

sgid suid help --need clarification

I'm writing this command/script to allow students to vi a private file of mine in a private directory of mine. chmod 700 dir chmod 660 file however since i own the directory and file; the script has to be ran by me so to speak, im just not sure how to set about doing this. the script is... (5 Replies)
Discussion started by: StrengthThaDon
5 Replies

6. UNIX for Advanced & Expert Users

SUID not working

Hi Senario: I have previleges to edit a file F but User B does not have sufficient privs to edit it. In order for B to edit it I tried an indirect way. I created a script to edit F and SUID this script so that B can execute it with the privs of me. But this is not working . can some one help... (3 Replies)
Discussion started by: Pankaj Mishra
3 Replies

7. UNIX for Dummies Questions & Answers

what is suid ?

what is SUID ? can someone explain or point me to a link ? thanks simon2000 (2 Replies)
Discussion started by: simon2000
2 Replies

8. Cybersecurity

suid files???

Hi all, Where can i find list of suid and gid files common for the system, let's say RedHat 7.1? Thank you all Regards :D (1 Reply)
Discussion started by: solvman
1 Replies

9. Programming

SUID bit???

Hi all I'm getting file info through stat( char *filename, struct stat *buf) Taking all the file attributes to buf->st_mode, How can i check the suid bit in there, if suid bit mask is 0004000?? Thank you all (1 Reply)
Discussion started by: solvman
1 Replies
Login or Register to Ask a Question