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

Allow specify new folder permission. #357

Open
leptonyu opened this issue Oct 12, 2024 · 12 comments
Open

Allow specify new folder permission. #357

leptonyu opened this issue Oct 12, 2024 · 12 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@leptonyu
Copy link

leptonyu commented Oct 12, 2024

Description:

Current design hardcode folder permission as 0o777.

if err := os.MkdirAll(fullPath, 0o777); err != nil {

Request:

  1. Make default permission as 0o770.
  2. Provider a parameter to override default permission.
@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 as fresh with /remove-lifecycle stale
  • Close this issue 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 Jan 10, 2025
@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 9, 2025
@niranjandarshann
Copy link

@leptonyu Thank you for raising this issue. The issue have less description. Which is not easy to understand in one go,
Try to give proper reference of this issue. In which file you encounter it.

@niranjandarshann
Copy link

From my investigation i come to know that you may be talking about nfs-subdir-external-provisioner/cmd/nfs-subdir-external-provisioner having provisioner.go file .

@leptonyu
Copy link
Author

Yes, this one. Line 115

if err := os.MkdirAll(fullPath, 0o777); err != nil {

@niranjandarshann
Copy link

I think, Hardcoding 0o777 is a security risk. Instead we can use 0770 for better security.

@leptonyu
Copy link
Author

I would recommend to set default as 0o770 and allow customization in parameters.

@niranjandarshann
Copy link

@leptonyu Can you update the the description and what is your expectation in the issue description. So that it will be easy to the contributor to contribute.

@leptonyu
Copy link
Author

Done

@Poldovico
Copy link

How would this interact with the fact volumes do not respect fsGroup and cannot have their owners changed by an InitContainer?
Wouldn't having the permissions set any other way than 777 make it impossible to use mounted volumes with containers that don't run as root?

@leptonyu
Copy link
Author

leptonyu commented Mar 4, 2025

Customizing Settings could be configured as 777 to keep as-is, or design matched user/group to run Pod.

@LSuDavidd
Copy link

I am not involved in this discussion but what i think is giving permission 0o777 will not be good the issue is correct instead if we permit it to the 0o770 atleast we are targeting to the most. And Here customizing will be good as if you want to give full permission then you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants