Change Owner and Group of Folder and Subfolders with commandLine
[Skip if you are busy]
I wanted to share my music with my brother's user account, but I didn't want to make a copy of that or move it, then I created a group called publicmedia changed the permissions of the folder 'Music' and assigned it to the group publicmedia, but I had to do it for every single sub folder in the folder Music. To change the permissions is easy by using the option "change Permissions for Enclosed Files", but it didn't change the group, then I searched and this is what I found
[Here is the important]
The next command will change the group and the owner of a folder, by using the option -R it does recursively for every subfolder inside
chown -R snipercat:publicmedia Music
[IMPORTANT!] If the owner of the folder enabled the option to encrypt the folder, this will not work unless the owner of the folder logged in before, you have to set it off, try with this How to Disable Home Folder Encryption After Installing Ubuntu.
source: Quis @ How to change owner and group in a directory to include subdir and all files -
if it worked, then now Celebrate like Kashiyuka ^-^
Comments
Post a Comment