I am using a linux system and need to experiment with some permissions on a set of nested files and directories. I wonder if there is not some way to save the permissions for t
hm. so you need to 1) read file permissions 2) store them somehow, associated to each file 3) read your stored permissions and set them back
not a complete solution but some ideas:
stat -c%a filename
>644
probably in combination with
find -exec
to store this information, this so question has some interesting ideas. basically you create a temporary file structure matching your actual files, with each temp file containing the file permissions
to reset you iterate over your temp files, read permissions and chmod the actual files back.