Somethimes – especially on RACs – it is required to synchronize permissions on an ORACLE_HOME running on one node with the permissions running on the other node.
Today i had the problem that after a patch all permissions were garbled. In order to restore service i had to fix them. The first idea here would be to copy the permissions from a working node and here is how you do it easy:
find /data/oragrid/product/126.96.36.199 -printf 'chown %U.%G %p\n' > /tmp/chown-home.sh find /data/oragrid/product/188.8.131.52 -type d -printf "chmod %m %p \n" > /tmp/chmod-home.sh find /data/oragrid/product/184.108.40.206 -type f -printf "chmod %m %p \n" > /tmp/chmod-home.sh
The scripts output for the file permissions looks like this:
chmod 775 /data/oragrid/product/220.127.116.11 chmod 755 /data/oragrid/product/18.104.22.168/patches chmod 755 /data/oragrid/product/22.214.171.124/patches/p12989056 chmod 755 /data/oragrid/product/126.96.36.199/patches/p12989056/12989056 chmod 755 /data/oragrid/product/188.8.131.52/patches/p12989056/12989056/custom
and for the ownership:
chown 0.30275 /data/oragrid/product/184.108.40.206 chown 20341.30275 /data/oragrid/product/220.127.116.11/JRE chown 20341.30275 /data/oragrid/product/18.104.22.168/patches chown 20341.30275 /data/oragrid/product/22.214.171.124/patches/p12989056 chown 20341.30275 /data/oragrid/product/126.96.36.199/patches/p12989056/12989056
Just execute the scipts in any order and you are done.