In this Linux 101, Jack Wallen describes the SUID permission bit.
If you are new to Linux administration, you’ve in all probability currently started understanding about file permissions. If I reported “drwxrwxr-x,” you would know what that intended. It is very simple: A listing with operator and team examine, publish, execute permissions, but only examine and execute permissions for absolutely everyone else.
That’s not the be-all, stop all for permissions. There are in fact a few extra permissions, just one of which I’m likely to train you about ideal now. Said authorization is termed SUID, which stands for Set owner User ID. This is a specific authorization that applies to scripts or purposes. If the SUID bit is established, when the command is run, it is really helpful UID results in being that of the operator of the file, in its place of the person jogging it.
SEE: Kubernetes security guideline (free of charge PDF) (TechRepublic)
This is made use of to present short term elevated permissions for the duration of execution. For example, if the file remaining executed was owned by root and has the SUID bit established, no matter who is functioning the script or software, the permissions would generally (temporarily) equivalent people of root.
Just one quite easy-to-recognize example of this is when a consumer wishes to modify their password and they challenge the sudo passwd command. If the SUID bit was not established on passwd, the command would be operate devoid of elevated privileges, and wouldn’t be ready to publish to the vital data files to modify the password–consequently the SUID bit.
If you produce a script (owned by the root consumer) that needs the SUID little bit established, you’d do so like:
sudo chmod u+s filename
Where filename is the name of the script or application. At the time the SUID bit is established, at any time that software is executed, it will be executed with temporarily elevated privileges.
And that is the gist of the SUID authorization bit. It sounds additional complicated than it genuinely is. Even though you might not use it every single working day, you can be glad you know it, when you operate into a circumstance where it is really evidently important.
Subscribe to TechRepublic’s How To Make Tech Do the job on YouTube for all the most current tech assistance for small business pros from Jack Wallen.