Hi,
A colleague did a chmod -R 777 /var on de RHEL 8 server. Is there a fast way to restore the settings without restoring the server?
I took a similar (similar OS wise) server an did a
find /var -type f -exec stat --format 'chmod %a %n' {} \; >/tmp/restore_prots_files.sh
find /var -type d -exec stat --format 'chmod %a %n' {} \; >/tmp/restore_prots_dir.sh
And did copy the shell scripts to the affected server and did run it. But as the servers are not 100% similar I still have some files/dirs on the affected servers that have 777 protection and I'm not sure what it should be.
regards,
Ivan
A colleague did a chmod -R 777 /var on de RHEL 8 server. Is there a fast way to restore the settings without restoring the server?
I took a similar (similar OS wise) server an did a
find /var -type f -exec stat --format 'chmod %a %n' {} \; >/tmp/restore_prots_files.sh
find /var -type d -exec stat --format 'chmod %a %n' {} \; >/tmp/restore_prots_dir.sh
And did copy the shell scripts to the affected server and did run it. But as the servers are not 100% similar I still have some files/dirs on the affected servers that have 777 protection and I'm not sure what it should be.
regards,
Ivan