Showing posts with label setgid. Show all posts
Showing posts with label setgid. Show all posts

Tuesday, August 3, 2021

Linux - SetUID - SetGID - Stick Bit - Special File Permissions

setgid Creates a file using owner rather than user creating it

setuid sets the permission of execution

sticky bits - Accidental Delete Protection Bit

https://www.cbtnuggets.com/blog/technology/system-admin/linux-file-permissions-understanding-setuid-setgid-and-the-sticky-bit   [IMP]

https://geek-university.com/linux/uid-user-identifier-gid-group-identifier/


Setting the setuid bit
To set the setuid bit symbolically, we can use chmod u+s </path/to/the/file>.
To set the setuid bit using octal representation we can add "4" to the front of our standard octal permissions


Setting the setgid bit
To set the setuid bit symbolically, we can use chmod g+s </path/to/the/file>.
To set the setgid bit using octal representation we can add "2" to the front of our standard octal permissions


Setting the sticky bit
We can set the sticky bit on directories symbolically with chmod +t :
Or using octal values and putting "1" in front of our standard permissions:

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass