FS#60967 - Chmod no longer works with new gocryptfs package (1.6-2)

Attached to Project: Community Packages
Opened by Dmitri Kourennyi (DmitriK) - Tuesday, 04 December 2018, 17:25 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 14 December 2018, 14:46 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
It looks like the gocryptfs package got moved to community from the AUR on Dec 1. After I upgraded to the community version (1.6-2), the mounted file system is no longer supports permission changes. Reverting back to a cached AUR build (1.6-1) results in chmod working correctly again.

Attempting to use chmod within the mounted FS in 1.6-2 results in:
bash-4.4$ touch foo
bash-4.4$ chmod 600 foo
chmod: changing permissions of 'foo': Operation not supported

And if fuse debugging is enabled, the relevant line in the log is:
Serialize 161: SETATTR code: 95=operation not supported value: {A0.000000000 {M00 SZ=0 L=0 0:0 B0*0 i0:0 A 0.000000000 M 0.000000000 C 0.000000000}}

I am not familiar enough with fuse to know where to look to keep debugging. The only thing I see in the PKGBUILD that may be related is that the one in community does not do a `go get -d github.com/hanwen/go-fuse/fuse` step while the one in AUR did. Maybe it's because the build server has a different version of the go-fuse package?

Additional info:
gocryptfs 1.6-2
fuse 2.9.8

Steps to reproduce:
- mount an encrypted gocryptfs system, using default options
- try to run chmod on any file in the unencrypted mount
- Basic unix permissions used to work, now fails with code 95
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 14 December 2018, 14:46 GMT
Reason for closing:  Upstream
Comment by xelra (xelra) - Tuesday, 11 December 2018, 23:10 GMT
So I've played around with this for 2 days now. The PKGBUILD from the community package gocryptfs-1.6-2 differs significantly from the PKGBUILD from the AUR package gocryptfs-1.6-1.

The issue is most likely the build process in the new package build. I've ruled out every other possible reason, especially a changing build environment. At first I thought this had something to do with the EOPNOTSUPP errors that are reported on new kernel versions. This wasn't the case though.

When building 1.6-1 and 1.6-2 on a current Arch system (2018-12-11T23:00:00Z) only the latter has the chmod bug.

I also found it really strange that 1.6-2 had all those Haskell build dependencies, whereas 1.6-1 only depends on go-2.

Please change severity to high. I think a filesystem that cannot set attributes qualifies as high.
Comment by Dmitri Kourennyi (DmitriK) - Thursday, 13 December 2018, 16:38 GMT
Today I saw that there was an update to 1.6.1. I tried it out, and it seems fine now. PKGBUILD indicates only some upstream changes, so I still can't explain the difference in behavior between AUR 1.6-1 and community 1.6-2. Odd, but I'm closing this as it is fixed for me.
Comment by xelra (xelra) - Thursday, 13 December 2018, 18:04 GMT
I've talked to the dev of gocryptfs and the issue was two-fold. There was an existing bug, but it only showed when building with a certain build source. That's the reason this issue came up, when the build process changed from "checking out the repo" to getting "gocryptfs_v1.6_src-deps.tar.gz".

The issue was fixed with this commit https://github.com/rfjakob/gocryptfs/commit/658cc4aebba2f1e328911cf6e2f9f6c9d1084a6c and v1.6.1 was released.
Comment by xelra (xelra) - Friday, 14 December 2018, 00:04 GMT
I've talked to the dev of gocryptfs and the issue was two-fold. There was an existing bug, but it only showed when building with a certain build source. That's the reason this issue came up, when the build process changed from "checking out the repo" to getting "gocryptfs_v1.6_src-deps.tar.gz".

The issue was fixed with this commit https://github.com/rfjakob/gocryptfs/commit/658cc4aebba2f1e328911cf6e2f9f6c9d1084a6c and v1.6.1 was released.

Loading...