Can't create folder or file under a normal user when mounted by root with force_owner
I mount an encrypted folder under the root user, but try to access decrypted content via a separate user (1001:1001). I specify -allow_other flag as well as -force_owner 1001:1001. When I access the decrypted content using the specified user, the access seems to be limited: I can modify the existing files (e.g., created by root before), but can't create any new files or folders, even though the owner of the content is 1001:1001. Any ideas what is wrong? It looks like a bug to me.
Steps to reproduce:
- create a new user (1001:1001);
# gocryptfs -init -xchacha -config ~/crypt.conf crypt# gocryptfs -openssl true -config ~/crypt.conf -allow_other -force_owner 1001:1001 crypt plain# cd plain# mkdir new# touch foo- Login as the user mentioned before (1001:1001)
$ mkdir new2gives a permission denied error$ touch bargives a permission denied error$ mv new new2is fine$ mv foo baris fine- Editing
baris fine