Strange guide with file permissions on ext4 after rsync from CentOS 8 to Debian 11
I'm sure I'm missing something obvious here, but I'm experimenting with I'm working on a project and hit a roadblock..... I'm currently working with a perplexing scenario where, after syncing files from a CentOS 8 server to a Debian 11 server using `rsync`, the permissions of certain files seem to be modified unexpectedly. Specifically, some executable files that should maintain their executable permissions are losing them after the transfer. I used the following command to perform the sync: ```bash rsync -avz --progress --chmod=ugo=rwX /path/to/source/ user@debian-server:/path/to/destination/ ``` The `--chmod=ugo=rwX` option was intended to ensure that directories and files maintain their correct permissions, but it seems that several `.sh` files are ending up with permissions set to 644 instead of 755. I’ve confirmed that they were indeed 755 on the CentOS server before the transfer. Upon checking `rsync` logs, I noticed no errors or warnings, and the command completes successfully. I also tried adding the `-p` option to preserve permissions: ```bash rsync -avzp --progress /path/to/source/ user@debian-server:/path/to/destination/ ``` Still, the same scenario continues. Additionally, I verified that the umask on the Debian machine is set to 022, which should allow executables to retain their permissions. Is there anything obvious that I might be missing, or is this a known quirk with how `rsync` interacts with different distributions? Any insights would be greatly appreciated! For context: I'm using Bash on macOS. I'd really appreciate any guidance on this. This is happening in both development and production on Debian. Has anyone else encountered this? This is happening in both development and production on CentOS. What would be the recommended way to handle this?