LinuxQuestions.org
Help answer threads with 0 replies.
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, 01: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 01:53 AM.
 
Old 05-10-2013, 01:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 19,552

Rep: Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622
https://en.wikipedia.org/wiki/User_identifier
can you please explain 2
 
Old 05-10-2013, 02:12 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,141

Rep: Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671
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, 04: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, 01:20 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 19,552

Rep: Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622Reputation: 6622
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:59 PM
Difference between UID and effective UID chakribobby Linux - Newbie 2 10-23-2007 11:56 AM
Effective UID and real UID Milosevic Linux - General 1 01-06-2007 04:01 PM
Effective UID and Real UID Milosevic Linux - Newbie 1 01-06-2007 11:41 AM

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

All times are GMT -5. The time now is 10:15 AM.

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