8.5 Ownership

The main command to change ownership of a file is chown. Note that chmod changes file permissions, but not ownership.

chown can be used to change user level ownership or group level ownership. For example, to change ownership of a file xyz to funky, we can do the following:

chown funky xyz

The following example changes group ownership to cisn120:

chown :cisn120 xyz

You can change both the user-level and group-level ownerships at the same time:

chown funky:cisn120 xyz



Copyright © 2006-07-31 by Tak Auyeung