How to change Linux User (UID) and Group (GID)
From SSH you can easily change the UID and GID by using the chown command. Shown below is the structure of the command and how to use it to change Group and User id’s. This is especially useful if you are having problems transferring files using FTP.
Change both UID and GID
Login as root user with SSH.
chown -R newuserID:newgroupID folder_name
To give you a working example.
If the folder you wanted to change was test_folder and
the group ID was testgroup and
the user ID was testuser, then you would use the following command:
chown -R testuser:testgroup test_folder
Note: the -R means to change recursively, so that the user and group ID are changed for all files and folders within the parent folder; simply leave out -R if you only want to affect the parent folder
Just change User ID (UID)
If you would like to just change the user ID and not the group ID, then using the example above use the following command:
Login as root user with SSH.
chown testuser test_folder
Related Articles
- 17.06.11: Sales order error in Magento Sage Pay (0)
- 25.02.11: Delete failed: *.php Joomla! (1)
- 14.02.11: Perl files download instead of executing / processing (fixed) (0)
- 28.02.11: Joomla permissions (3)
- 08.04.11: Coupon Code in Order Confirmation Email - Magento (5)









Comments RSS Feed





sweeet, cheers for that, nice and simple explan.
Go to Top of the page