How Do I Chown a Directory in Linux?

How Do I Chown a Directory in Linux?
Contents

Can you chown a directory?

The chown command allows you to change the user and/or group ownership of a given file, directory, or symbolic link. In Linux, all files are associated with an owner and a group and assigned with permission access rights for the file owner, the group members, and others.

How use chown command in Linux?

How to Change the Owner of a File

  1. Become superuser or assume an equivalent role.
  2. Change the owner of a file by using the chown command. # chown new-owner filename. new-owner. Specifies the user name or UID of the new owner of the file or directory. filename. …
  3. Verify that the owner of the file has changed. # ls -l filename.
James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.