Entradas

Mostrando las entradas etiquetadas como sticky

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...

Permisos Unix: Los bits SUID, SGID y sticky

Hola hoy escribiré sobre más permisos, esta vez será sobre los bits Sticky, SUID y SGID. Hablaré sobre ellos porque un seguidor solicitó que escribiera más sobre permisos, en particular estos. Bit Sticky El bit Sticky lo que hace es que al ejecutar una aplicación esta resida en memoria por lo que si otro usuario (pensando en sistema multiusuario) accede a esa misma aplicación se ejecutará más rápido ya que se encuentra activo en la memoria. Entonces este permiso sirve para agilizar las ejecuciones en caso de que varios usuarios accedan a la vez a ella. Bit SUID Si aplicamos el bit SUID a una aplicación al correrlo se ejecutará con el UID del dueño del archivo aunque nosotros estemos logueados con un usuario distinto. Así que por ejemplo si necesitamos que todos los usuarios puedan utilizar fdisk sin tener que escalar a root o utilizar sudo sólo debemos aplicar este bit. Bit SGID Lo mismo que SUID pero aplica para el grupo al que pertenece la aplicación. El bit SUID para...