The command chown changes the ownership of a file or directory. The syntax is chown user:group file, where user is the new owner and group is the new group of the file. In this case, the superuser can grant the user bob write permission to the file by changing both the owner and the group of the file to bob. This way, bob will have the same permissions as the original owner, which is read and write. Alternatively, the superuser can also use the command chmod to change the permissions of the file without changing the ownership. For example, chmod g+w bobsfile will add write permission to the group, and chmod o+w bobsfile will add write permission to others. However, these commands will also affect other users who belong to the same group or are not the owner or the group of the file. References:
FreeBSD Handbook: File and Directory Ownership
FreeBSD Handbook: File and Directory Permissions
Linux Professional Institute BSD Specialist: 702.1 Filesystem and Devices
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit