Cannot write to a file if the owner doesn't have the read permission
declan94 opened this issue · 6 comments
declan94 commented
The owner cannot write to a file if he doesn't have the read permission, even if he has the write permission.
For example, if the file's mode is --w-rw-rw-, the owner cannot write to the file
rfjakob commented
That is correct, gocryptfs always needs read permissions due to read-modify-write. I'll see if can work around this by chmod'ing the file for an instant.
declan94 commented
I'm sorry, but it seems not work.
rfjakob commented
What is you gocryptfs -version
output? You should get v1.4-24-g3062de6
and with that version it seems to work here, see below:
$ gocryptfs -version
gocryptfs v1.4-24-g3062de6; go-fuse v20170619; 2017-07-13 go1.8.3
$ echo xxx > foo
$ chmod 0200 foo
$ ls -l
total 4
--w-------. 1 jakob jakob 4 13. Jul 22:47 foo
$ echo xxx >> foo
$ echo xxx > foo
declan94 commented
Oh, I'm sorry my version is: gocryptfs v1.4-21-gb6bda01; go-fuse v20170619; 2017-07-12 go1.8.3
After update to the latest version, it works! Thank you.
rfjakob commented
Thanks for testing!