I've got a few directories that I want to make read-accessible to other users without having a unix group. I can accomplish this with:
setfacl -R -m u:user1:rX dir1
setfacl -R -m u:user1:rX dir2
setfacl -R -m u:user2:rX dir1
setfacl -R -m u:user2:rX dir2
I can go one step further and make any future files/directories read accessible as well with:
setfacl -d -R -m u:user1:rX dir1
setfacl -d -R -m u:user1:rX dir2
setfacl -d -R -m u:user2:rX dir1
setfacl -d -R -m u:user2:rX dir2
However, once in a while, an application seems to make a file/directory which is only readable by me, presumably by using mode 0600 or 0700. When I find out this has happened, I want to fix all the files this may have happened to, and so I rerun the two sets of commands above. However, for all the files that have been created after I ran the second set of commands, as they have execute permission for user1 & user2 (despite the mask not having execute permission, and effectively for user1 & user2), the X in the commands above cause them to become executable (ie, the mask now has execute permission).
How can I stop setfacl from making files executable? The only workaround I've come up with is to remove all ACLs with -b and start again, but that takes longer for directories with more files.