On 2024-01-22 02:03, -pj via openSUSE Users wrote:
Hi, I am looking to change group ownership for the entire user paul's home folder, it's subdirectories and also all symlinks.
Thinkcentre-M57p:/home> ls -lah total 0 dr-xr-xr-x 1 root root 14 Jan 21 18:18 . drwxr-xr-x 1 root root 142 Jun 3 2021 .. drwx------ 1 deb deb 318 Jan 21 15:12 deb drwxr-xr-x 1 paul users 868 Jan 21 18:14 paul paul@paul-Thinkcentre-M57p:/home>
Passing: chgrp -LR paul users
Is how I believe chgrp should be used in this case.
Does this look correct to you? If not why and is there a better command for this purpose?
-L is dangerous. If you have symlinks on directories from other users, or system things, it will try to change the permissions of the target. If you run the command as your user, it is probably safe because those should fail; but if you are root, the command will succeed. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))