LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-10-2013, 12:52 AM   #1
techie_san778
Member
 
Registered: Jul 2011
Posts: 90

Rep: Reputation: Disabled
Exclamation What is the difference between Real UID and Effective UID in terms of file attributes


Hello Everyone!!

1. What is the difference between the Real UID and Effective UID in terms of file attributes ? Can someone explain it with suitable example ?

2. If its possible, How to set the Effective UID of a file ?

Last edited by techie_san778; 05-10-2013 at 12:53 AM.
 
Old 05-10-2013, 12:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
https://en.wikipedia.org/wiki/User_identifier
can you please explain 2
 
Old 05-10-2013, 01:12 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Files don't have that; they are process attributes eg
http://www.osso.nl/tech/blog/2012/08...euid-uid-euid/
http://notepad2.blogspot.com.au/2012...-in-linux.html
https://en.wikipedia.org/wiki/User_identifier
 
Old 05-10-2013, 03:55 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Effective UID and Real UID are process attributes. A process may set (via a setuid or su) the effective UID - which is then used for general file access.

The Real UID is used when the process wants to restore its UID (doesn't happen very often as it is a bit awkward). The seteuid is allowed to be changed IF the real UID is root, OR the new effective UID is the same as the Real UID.
 
Old 05-11-2013, 12:20 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
actually you can set setuid and setgid bits on a file (on an executable), but I do not know what OP really meant. see: http://linux.die.net/man/1/chmod
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Real uid and effective uid palisetty_suman Linux - Newbie 2 02-15-2009 12:59 PM
Difference between UID and effective UID chakribobby Linux - Newbie 2 10-23-2007 10:56 AM
Effective UID and real UID Milosevic Linux - General 1 01-06-2007 03:01 PM
Effective UID and Real UID Milosevic Linux - Newbie 1 01-06-2007 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration