Linux files are owned by one user owner and one group owner but no more. Using chown we can change the user and group ownership of a file or directory. File and directory ownership can also be set recursively if necessary. Users and groups have to exist before making files owned by them. Their existence can be verified by viewing /etc/passwd and /etc/group.
- [Narrator] Before we can talk about setting permissions,…we need to talk about file ownership.…A file is owned by exactly one user owner…and one group owner.…If we do an ls-l on a file,…we'll see that the long list includes the file's owners.…I'm using a fictitious file name, file.txt…as an example.…You can do a long list on any file in your OS…to see similar data.…The user owner is the third column from the left.…The group owner is the fourth column.…
The command we use to change the ownership…of a file is called chown.…The syntax is chown space,…options space,…username colon group name space file name.…To set the user owner, we just use one name.…For instance, chown space bob space file.txt…would change the user owner to bob.…Keep in mind that in order to change…the ownership of a file,…you need to either be root…or elevate privileges with sudo.…
To set the group owner, the syntax would be…chown, space, colon, the group name,…in this case, bobgroup, space, file.txt.…To set both the user owner and the group owner…
- Define file Access Control Lists.
- Describe what extended globs add to Linux pattern matching.
- State why file system recovery tools are so important for Linux users.
- Recall what execute permissions on a directory allows.
- Cite the maximum allowed default permissions on a file in Linux.
- List some of the advantages of ACLs over standard Unix permissions.
Skill Level Intermediate
Linux: Desktops and Remote Accesswith Grant McWilliams1h 44m Intermediate
1. Linux Files
2. Manipulate Files
3. Standard Unix Permissions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.