質問

Platform: CentOS 5.6 x86_64

I have a production server and a development server. I want to debug file ownership and permissions across a large directory structure, which is almost identical, give or take a few ephemeral files in temporary caches.

Does anyone know if this is possible? Manually checking file-for-file would not be practical, given the size of the directory tree.

Thanks in advance.

役に立ちましたか?

解決

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

This is the BEST script to bakup and restore the permissions of directories. When you get the directory permissions list from both servers, just run a diff on them (you might want to make some modificatins before that)

他のヒント

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

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top