File permissions and ownership

Check the effective id:

Check user’s group association:
groups groups john
id id john

File ownership and permissions:
ls -l

Access Modes:
Set user id: suid
Set group id:sgid

Immutable files – cannot be deleted:
Set a file to be immutable: chattr +i
List files attributes: lsattr

Display effective file creation mask:
Display not to be granted permissions: umask
Display allowed permissions: umask -S
Private files: umask u=rwx,g=,o=,
umask 0077

File owner and group
chgrp – to change a group of a file

chown – to change ownership of a file
chown :
chown :


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s