I have an annoying problem. I have made a user account that I want to be able to create files and folders off a chroot'd directory /home/user/. So it can do what it wants there. But I want the default permissions of newly created files to be 660, and newly created directories to be 770 (since the owner and group need the execute bit set to change down into that folder).
I can't find a method to actually accomplish this, since setfacl or umask both appear to affect files and folders.
People keep telling the answer is to use umask 0007. However I disagree, because the mask would allow rwx for all new files and folder created by user or group. If the application allows to create a file with the x bit set, then the mask would also allow the file to inherit that setting.