pbackup is a small utility for backing up and restoring file permissions on GNU/Linux and compatible UNIX based systems. It enables you to store the current access permissions from any part of the file system to a local file. This file can later be used to restore modified access permission if needed.
(You never know when someone will execute `chmod -R 777 .` without realizing that they are standing on the root level)
USAGE:
pbackup < -S|-R|-C > [options] [file(s)]
OPTIONS
-S generate backup data from file(s), dump to stdout
-R restore permissions from backup through stdin
-C check current file permissions against backup
-r be recursive (save mode only)
-v be verbose (restore mode only)
-m < num > max open file descriptors when being recursive (default is 64)
-V print version and exit
EXAMPLES
create backup data: pbackup -S -r / > permbackup.db
check permission integrity: pbackup -C < permbackup.db
restore from backup: pbackup -R < permbackup.db
Product's homepage