You are not logged in.
"Set user ID" usually refers to the SUID file permission bit on an executable file...
When a file with that bit set is executed, then it is run with its effective UID set to
whoever owns the file... This is often used to to allow unprivileged users to do
certain things that require root privilege, by making the executable file owned by
root and setting the SUID bit on it... (This has also historically been the source of
many local privilege escalation exploits, due to security holes in those setuid apps...)
and how I can set a setuid bit of a file?
Via the "chmod" command from a command-line, or via the chmod() function from
within an app... Type "man 1 chmod" and "man 2 chmod" for full info...
whether the real user Id of a process is the same as the effective Id ?
Um, no, not necessarily... Specifically in the case of running a setuid app, the
effective UID will be the owner of the executable file, while the real UID will be that
of the real user running the app...
are the user Id of a procee is same as the user Id of a file?
what are differences between them?
What? No idea what you're even asking here...
But, that question doesn't make any sense to me... Do you mean when running
a setuid executable file? If so, then the effective UID of the process will be the
owner of the file... As I've already mentioned... So, I still don't know if you're
asking something completely different...
oh,I have a doubt in the saved set-user-id ,I do not know what is the meaning of this ID,why we need this saved set-user-id? and when we need to use this ID?whether the saved user-user-id the same as the set-user-id ?
Is the set-user-id the synonym of the saved set-user-id?
No... Set-user-ID applies only to files... Real UID, effective UID, and saved UID
apply to running processes... Now, if you run an exectuable with the set-user-ID bit
set, then the resulting running process will start off with a real UID of the real user
running it, and an effective and saved UID of the owner of the executable file... If
the process then calls setuid() or seteuid() to change their effective UID, they can
still get back their original privileges again thanks to the saved UID...