sucommands. Ownership of files in Linux and access authority are closely related to user ids and groups.
It can show numeric ID’s (UID or group ID) of the current user or any other user in the server.
ls-lcommand to display the owner and group.
As you can see, the file1 belongs to user1 and a group called user1.
-indicates that the corresponding permission is not granted. example:
If we want to set different permissions for user, group, or other, we can separate different expressions by commas —for example,
using a as ugo with = operator to set exact mode easier
Directories and sgidWhen a directory has the sgid mode enabled, any files or directories created in it will inherit the group ID of the directory. This is particularly useful for directory trees that are used by a group of people working on the same project.
+/-for adding and removing permissions.
As you have probably noticed, if the file or directory is already executable s and t would be displayed after setting access modes.But if the file or directory hasn't been executable before setting access mode, S and T would be appear.
- /etc/profile (usually)
- /etc/bashrc (usually)
- /etc/logindefs (ubuntu)
chowncommand, and the group by the
chowncommand.We can use user name or user ID.
-cReports when a file change is made. We can also use other file ownership via
-Roption to allow changes to be applied recursively to all selected files and subdirectories.