3.linux Users, Groups, and File Permissions
3.linux Users, Groups, and File Permissions
Student Handout
Linux Users, Groups, and File Permissions:
Student Handout
Examples:
Groups in Linux
Primary Group: Default group assigned to a user.
Secondary Group: Additional groups a user can belong to.
Examples:
Examples:
Permission Categories
Owner (User): Permissions for the file owner.
Group: Permissions for the group.
Others: Permissions for all other users.
Examples:
Examples:
1. Adding Execute Permission: Use chmod u+x filename .
2. Setting Permissions with Numbers: Use chmod 755 filename for full owner
permissions and read/execute for others.
3. Removing Read Permission: Use chmod o-r filename to remove read permission for
others.
Examples:
Conclusion
Users: Individuals with system access.
Groups: Collections of users for managing permissions.
File Ownership: Divided into user, group, and others.
Permissions: Determine actions on files (read, write, execute).
Commands: Use chmod for permissions and chown for ownership changes.
By mastering these concepts, you can effectively manage access to files and directories on a
Linux system.