0

Incomplete/Corrupt Files Served when User Files Mounted from SMB/CIFS

guy 4 months ago updated 2 months ago 2

We are doing a pilot with FileRun to determine if we like it more than Nextcloud for our needs. We are looking at buying the enterprise edition, but the pilot needs to be successful before we can commit.

We are running the docker-based version of FileRun on a Kubernetes cluster, with volumes backed by SMB, and we've found strange behavior with the files that FileRun serves. Essentially, FileRun is not able to serve files intact from the SMB volume. The issue matches almost exactly with the behavior described here:

https://serverfault.com/questions/1044724/apache2-sends-corrupt-responses-when-using-a-cifs-share

However, we have found that even modifying/extending the Docker image to configure Apache to use neither Sendfile nor MMAP has no effect on the issue. I have even tried removing

/etc/apache2/conf-enabled/filerun.conf

to disable XSendFile but that similarly has had no effect on the issue.

If we use NFS-based volumes or emptyDir volumes, the issue is not present, so this appears to be an issue with the way that FileRun/Apache interact with SMB. NFS isn't an option for production usage because it doesn't support transport-level authentication (i.e. we can't prevent other applications/pods/containers in the cluster from connecting to the NFS share and being able to read files that they should not be able to read).

I believe I'm encountering the same issue. What your issue random in it's presentation or did it affect all files?

adding "cache=none" to my SMB mount resolved this. I don't know what changed, but something is going on with Apache / SMB and this fixed it for me.