Hello,
#!/bin/bash HOMED="/home" DIRS=$(ls -l $HOMED | grep ^d | awk '{ print $9}') for d in $DIRS do chown -R $d.$d $HOMED/$d echo "chown -R $d.$d $HOMED/$d" done
The code above reset permissions in /home , chown:chgrp each folder to its owner. But it is not complete and cause some incompatiblities in email - ftp accounts.
Anyone can help me make this script complete ? It is very useful for virtualmin.
Thanks
Status:
Active
Comments
This works better :
I think this is almost complete :
Any suggestions ?