Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not write file , even the directory has permission to read/write #11383

Open
johnwmail opened this issue Jan 22, 2025 · 3 comments
Open

Can not write file , even the directory has permission to read/write #11383

johnwmail opened this issue Jan 22, 2025 · 3 comments
Labels
type: bug Something isn't working

Comments

@johnwmail
Copy link

Description

Please take a look the screen, thank you.

Image

Image

Steps to reproduce

No response

runsc version

docker version (if using docker)

uname

No response

kubectl (if using Kubernetes)

repo state (if built from source)

No response

runsc debug logs (if available)

@johnwmail johnwmail added the type: bug Something isn't working label Jan 22, 2025
@EtiennePerot
Copy link
Contributor

Do you observe the same behavior with similar permissions on a non-NFS mountpoint? I'm wondering if this is NFS-specific.

@johnwmail
Copy link
Author

Do you observe the same behavior with similar permissions on a non-NFS mountpoint? I'm wondering if this is NFS-specific.

Yes, maybe NFS-specific.

  1. /localdisk/fid work
  2. /nfs/fid NOT WORK
  3. /tmpfs/fid work

PS: runc runtime work for all above mount point

@ayushr2
Copy link
Collaborator

ayushr2 commented Jan 23, 2025

For NFS mounts, we set disable_file_handle_sharing mount option:

gvisor/runsc/cmd/gofer.go

Lines 744 to 750 in c238e15

case unix.NFS_SUPER_MAGIC, unix.FUSE_SUPER_MAGIC:
// The gofer client implements remote file handle sharing for performance.
// However, remote filesystems like NFS and FUSE rely on close(2) syscall
// for flushing file data to the server. Such handle sharing prevents the
// application's close(2) syscall from being propagated to the host. Hence
// disable file handle sharing, so remote files are flushed correctly.
rv = append(rv, "disable_file_handle_sharing")

So it may have something to do with that option, in which gofer filesystem uses gofer.specialFileFD for regular files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants