Is there a way to diff chown / chmod between directories of two servers?

Platform: CentOS 5.6 x86_64

I have a production server and a development server. I want to debug file ownership and permissions in a large directory structure that is almost identical to give or receive multiple ephemeral files in temporary caches.

Does anyone know if this is possible? Manually checking a file for a file would be impractical given the size of the directory tree.

Thanks in advance.

+4
source share
2 answers

http://linuxconfig.org/backup-permissions-in-linux

This is a BEST script for bakup and restoring directory permissions. When you get a list of directory permissions from both servers, just run diff for them (you might want to make some modifiers before)

+2
source

Just use find on both directory servers with the -ls flag, for example:

find directory_a -not ( test_for_ephemeral_files ) -ls > listing_a find directory_b -not ( test_for_ephemeral_files ) -ls > listing_b diff listing_a listing_b 
+2
source

Source: https://habr.com/ru/post/1380159/


All Articles