Today I Learned - Rocky Kev

TIL How to determine what security group you're in

POSTED ON:

TAGS:

In Linux (and most OSes), you're sorted into user groups, and users.

For example:
The Admin group, which lets you delete the hard drive.
The Gamer group, which only lets you play video games, create save files, etc.

The Gamer group doesn't have permissions to delete the hard drive.

It's a very basic and powerful concept of giving limited permissions.

On linux servers, you may stumble on a situation where you can't modify a file.

Maybe only the web group can modify files.

Are you in it?

In your command line:

These commands will help you figure out what group you're in, and if you belong to the group that can modify files.

$ groups
$ groups nginx
$ grep 'web' in /etc/group

Related TILs

Tagged:

TIL Trovald's Magic Numbers

These magic numbers are intended to safeguard against a typo or potential bit flips in the syscall number. Since reboot is a destructive and non-syncing operation, it's important to make absolutely sure that it isn't called accidentally due to a typo, a misbehaving program, or memory error

TIL linux user groups

UID 0 is reserved for root user. UID 1-99 is reserved for other predefined accounts. UID 100-999 is reserved for system accounts. Also notice that user accounts tend to start at 1000. UID above 999 are for normal user accounts.

TIL How to determine what security group you're in

These commands will help you figure out what group you're in, and if you belong to the group that can modify files.