Why do I get permission denied even as root?
Maybe it's SELinux?
Try check with
ls -ladZ dir1
or try to disable SELinux temporary
setenforce 0
# To emable "setenforce 1"
Is the directory in question hosted on NFS? If so, you might find that root:root is mapped to a safer user (e.g. nobody:guest) on the server.
If you have access to the server, and want remote users to have root privilege, you'll want to add the no_root_squash
option to the relevant export in /etc/exports
. I strongly urge you to read the documentation before doing so.