nieuwhier
Verified User
After restoring backups on other servers rights of some directories were changed within the users domains map. The user was unable to delete some logfiles where the owner of the map was suddenly root.
I was looking for a simple script that could change this for me. I am not a Shell script wonder but created the following:
ls -l /home | grep '^d'|awk '{print "chown /home/"$3"."$4" "$9"/domains -R"}' > ./sethome2
echo "Printing generated file sethome2. FIRST CHECK this file and then execute with sh ./sethome2"
cat ./sethome2
This will create the file sethome2 with all chown commands in it.
I hope it is of some use to you.
I was looking for a simple script that could change this for me. I am not a Shell script wonder but created the following:
ls -l /home | grep '^d'|awk '{print "chown /home/"$3"."$4" "$9"/domains -R"}' > ./sethome2
echo "Printing generated file sethome2. FIRST CHECK this file and then execute with sh ./sethome2"
cat ./sethome2
This will create the file sethome2 with all chown commands in it.
I hope it is of some use to you.