I have the next problem, i have 2 servers (debian) and each one have install tomcat.

The first server ( have installed tomcat with their default permissions in every folder (and that’s ok).

But , in my second server (, someone here put chmod 777 –R to every folder in tomcat, and I don’t know how to restore to the original permissions in every folder.

So, my question is, it’s possible copy the permissions tomcat’s folders from the first server ( and then set that permissions in tomcat’s folders of the second server ( ??


  • Someone put chmod on purpose, or maybe is it a file system, e.g. FAT, not supporting UNIX permissions? – caylee Apr 4 '18 at 15:26

Yes, it is possible. You can either copy the folder with scp -pr, preserving permissions and replace it with the old one, or, if the contents, but not the files differ, you can copy it (preserving permissions) and clone permissions:


The following answer could also be helpful: https://unix.stackexchange.com/a/20646

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.