Back up and restore file permissions

You can do this with the commands from the acl package (which should be available on all mainstream distributions, but might not be part of the base installation). They back up and restore ACL when ACL are present, but they also work for basic permissions even on systems that don't support ACL.

To back up permissions in the current directory and its subdirectories recursively:

getfacl -R . >permissions.facl

To restore permissions:

setfacl --restore=permissions.facl

I'm not aware of anything "off the shelf" that would do this. Here's a starter script for you, though, that will handle basic permissions. It does not handle ACLs of any description - but your Question explicitly excludes those. (It will also fail on pathological filenames - those starting with whitespace, or containing non-printable characters.)

Save the permissions

find * -depth -exec stat --format '%a %u %g %n' {} + >/tmp/save-the-list

Restore the permissions

while read PERMS OWNER GROUP FILE
do
    chmod "$PERMS" "$FILE"
    chown "${OWNER}:${GROUP}" "$FILE"
done </tmp/save-the-list