How to Change File Owner or Group in Linux
Linux allows you to control file access by assigning each file an owner and a group. If you have shell (SSH) access, you can use the following commands to modify file ownership or group association.
Change the Group of a File or Folder
chgrp groupname /folder/filename
This updates the group assigned to the file or directory.
Change the Owner of a File or Folder
chown ownername /folder/filename
This updates the user who owns the file or directory.
Important Notes
- You must have shell (SSH) access to use these commands.
- Shared hosting users without SSH access cannot change ownership or group settings.
- If you do not have SSH access, please contact support and a technician can apply the required changes for you.