|
This is the answer I got form some site : please verify it :/
Executables files are recognizable by their data, but they can be executable only if it's execution permission bit is set (do you know about permission bitmask???). If executable bit is set, and if the file is an executable recognized by the running kernel, the application starts.
An executable run with the permission of the caller: so if you run an application as user, the application have the permission of the user. If the user is "root", the application can do anything root can do!
Then, certain executable can be run only with root permissions, because it may edit some configuration file or anything else. So the application can do its job only if the application was started by the administrator (root).
If any application need superuser privileges, but should be run by any user, executable file have an extra permission bit: the SUID bit (Set User ID). When this bit is set, the permissions at run time doesn't depends on the application caller, but the file owner (do you about file owner/group?). So if application has SUID bit set and it's owned by root, when any user run the SUID executable, run application with root privileges.
|