singularity
singularity copied to clipboard
Fuse options not working
Version of Singularity
What version of Singularity are you using? 3.8.3
Describe the bug
When using the --fusemount option, if the fuse command includes the allow_other flag, it is not passed to singularity during the mount process.
Expected behavior
We expect that allow_other flag will result in fuse mount with allow_other and default_permissions.
$ singularity shell --fusemount "host:gocryptfs -allow_other --extpass echo --extpass testing /home/test/encrypted /home/test/decrypted" /path/to/container.sif
$ mount
fuse on /home/test/decrypted type fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001,allow_other,default_permissions)
Actual behavior
$ singularity shell --fusemount "host:gocryptfs -allow_other --extpass echo --extpass testing /home/test/encrypted /home/test/decrypted" /path/to/container.sif
$ mount
fuse on /home/test/decrypted type fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001)
Steps to reproduce this behavior
$ singularity shell --fusemount "host:gocryptfs -allow_other --extpass echo --extpass testing /home/test/encrypted /home/test/decrypted" /path/to/container.sif
$ mount
fuse on /home/test/decrypted type fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001)
OS / Linux Distribution
CentOS Linux release 7.9.2009 (Core)
How did you install Singularity
source
Additional context
I found that if I modify https://github.com/hpcng/singularity/blob/25b85be78434b2415723346afe80e9dd9ade83f1/internal/pkg/runtime/engine/singularity/container_linux.go#L431 and https://github.com/hpcng/singularity/blob/25b85be78434b2415723346afe80e9dd9ade83f1/internal/pkg/runtime/engine/singularity/container_linux.go#L2437 so that they both include ",default_permission,allow_other", then everything works as I expect. So, I am wondering if the code can be modified to honor any fuse options that are added inline.
That sounds like a reasonable thing to me. I suggest submitting a pull request.
Singularity repo is now retired as the code base is now moved to Apptainer. We are closing all the old issues under the old Singularity repo. For further assistance please open a new issue under the new Apptainer repo. Thanks for your support.