Entradas

Mostrando las entradas etiquetadas como special bits

Unix permissions: The sticky, SUID and SGID bits

Hello, today I'll write about more permissions, this time it will be about the Sticky, SUID and SGID bits. I'll write about them because one of my readers told me that it would be a good idea to write about these bits. Sticky bit What the sticky bit does is that when you execute an application it will be residing in the memory, so if other user (thinking in a multiuser environment) executes that same application it will run faster because it's already active in memory. So this permission fastens the executions if multiple users are using the same application. SUID bit If we apply the SUID bit to an application, it will run with the UID of the owner even if you are logged in as another user. For example if all the users need to execute fdisk without using sudo or escalate to root we just have to apply this bit to fdisk. SGID bit The same as SUID but it applies to the group owner of the application. The SUID bit to execute bash scripts as root Even if we ca...