Author Topic: How to change Owner and Group on a Directory  (Read 257 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to change Owner and Group on a Directory
« on: December 13, 2022, 08:06:15 PM »
Hi,

I tested that fix permissions option, selected a domain name.
It changed/set Owner and Group to "nobody" on some directories.
But I need to change "nobody" to the correct Owner and Group "user1"
Need to set the right Owner and Group for all files and folders in these directories.



Any help appreciated..

Offline
**
Re: How to change Owner and Group on a Directory
« Reply #1 on: January 08, 2023, 06:55:09 AM »
Here's a fun little one-liner you can execute from a root terminal that will reset ownership on all your user directories in /home:
Code: [Select]
for i in $(ls /home); do chown $i:$i /home/$i; done

Offline
*
Re: How to change Owner and Group on a Directory
« Reply #2 on: January 09, 2023, 04:18:11 AM »
@overseer thanks