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

wrong umask in nfs-controller pod #187

Closed
xhejtman opened this issue Apr 12, 2021 · 7 comments
Closed

wrong umask in nfs-controller pod #187

xhejtman opened this issue Apr 12, 2021 · 7 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@xhejtman
Copy link

It seems that current nfs-controller pod has umask 0022 which leads to PV created with access rights 0755. Is this desired? I guess not according to source codes:

if err = os.Mkdir(internalVolumePath, 0777); err != nil && !os.IsExist(err) {

should it be fixed to either allow set umask or set umask forcibly to 0000?

@andyzhangx
Copy link
Member

not sure what do you mean, I think you could submit a PR and then review, thanks.

@xhejtman
Copy link
Author

Ok, I try to explain it a bit more first, not sure if it is a real bug or not.

if err = os.Mkdir(internalVolumePath, 0777); err != nil && !os.IsExist(err) {
return nil, status.Errorf(codes.Internal, "failed to make subdirectory: %v", err.Error())
}

this code should create volume with access rights 0777. Unless umask is set.

It seems that rke1/2 containers have umask set to 0022 which means that persistent volumes are created with rights 0755 instead of 0777.

I guess it is a bug and nfsplugin should set umask to 0000 by itself. What do you think?

@xhejtman
Copy link
Author

xhejtman commented Apr 13, 2021

I tried workaround with -mount-permissions, but no luck either:

kubectl logs csi-nfs-node-bg684 -n kube-system -c nfs
flag provided but not defined: -mount-permissions '0777'
Usage of /nfsplugin:
  -add_dir_header
    	If true, adds the file directory to the header of the log messages
  -alsologtostderr
    	log to standard error as well as files
  -endpoint string
    	CSI endpoint (default "unix://tmp/csi.sock")
  -log_backtrace_at value
    	when logging hits line file:N, emit a stack trace
  -log_dir string
    	If non-empty, write log files in this directory
  -log_file string
    	If non-empty, use this log file
  -log_file_max_size uint
    	Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
  -logtostderr
    	log to standard error instead of files (default true)
  -mount-permissions string
    	mounted folder permissions

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 12, 2021
@andyzhangx andyzhangx removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 12, 2021
@juergenthomann
Copy link
Contributor

Have you tried it with "--mount-permissions=0777"? I think it did not work for me with a single dash at the beginning.

But I'm not sure if that has to be at the driver or controller. I have it currently for both, as the first I tried was not the right one.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 8, 2021
@andyzhangx
Copy link
Member

should be fixed by this PR(#238) in v3.0.0 release

TerryHowe pushed a commit to TerryHowe/csi-driver-nfs that referenced this issue Oct 17, 2024
…indows-versions

Remove Windows versions 1909 and 2004 which have reached EOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

6 participants