Username:
Password:
Linux Professional Institute: Level 2 Tutorials

Files & Filesystems / Manage File Ownership

Subtitles of the Movie

Exam objective 1.104.5 has a weight of 1, and verifies that candidates are able to control user and group ownership of a file. Every user has an ID number and every user is the member of a group, and the group has an ID numbers. Both of these ID numbers are kept in the Password file, which is kept in the ETC directory. This is my log-in entry in the file. This number is my user ID, and this number is the ID number of the group to which I belong. I have added another user, and this is the other user's ID number. The ID numbers are unique for each user, and this user is the member of another group. The group names are kept in another file, the Group File. Here is the name for group number 246, and this is the name of group number 310. Now, look at what happens when I use Touch to create a file, and look at that file with LS. You can see that my log-in ID is listed as the owner of the file, and the group of my log-in is listed as the group owner. That way, when the permissions are set for the user and the group they will apply to this one user and members of this group. Any number of users can be a member of the same group. You can change the ownership of a file or a directory, or a special file, but to do so, you need to log in as the Super User. Actually all you need is write permission to the file, but by changing ownership, you're also changing the permissions so it's easier just to login as root and that way you can set things to whatever you want. The Change Group command uses the name of the group and the name of the file, and it has now changed the group ownership of the file. You can see here that the ownership of the group has been moved to a group that isn't the same as the group of the user. That's okay. We're only talking about who has permission to do what, but it's just as easy to change the user's ownership also. You give it a new user name, and the name of the file, and the command Change Own does it. This is most often used to limit access of files to a specific group of log-ins, or to only one login. These are sometimes called work groups. You need to get the feel of the way these commands work. Create your own test file, then look through the password and group files and try changing ownership of the file to different users and groups. Create a directory and change its ownership for both user and group. Create a directory containing files and using the name of the directory and the recursive option, change the ownership of all the files and the directory with a single command.

Tutorial Information

Course: Linux Professional Institute: Level 2
Author: Arthur Griffith
SKU: 33894
ISBN: 1-934743-79-8
Release Date: 2008-07-21
Duration: 7.5 hrs / 113 lessons
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 70,000 Video Tutorials (14,250 free)
  • Video Available as Flash or QuickTime
  • Over 650 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available