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

fix: mount with 0777 in volume creation and deletion #843

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

andyzhangx
Copy link
Member

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix: mount with 0777 in volume creation and deletion
fix: #840 (comment)

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 8, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 8, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 8, 2024
@coveralls
Copy link

coveralls commented Sep 8, 2024

Pull Request Test Coverage Report for Build 10758293626

Details

  • 30 of 33 (90.91%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.6%) to 78.905%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/smb/controllerserver.go 15 16 93.75%
pkg/smb/smb.go 15 17 88.24%
Files with Coverage Reduction New Missed Lines %
pkg/smb/controllerserver.go 6 75.2%
Totals Coverage Status
Change from base Build 10734014917: 0.6%
Covered Lines: 980
Relevant Lines: 1242

💛 - Coveralls

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx merged commit f184d4d into kubernetes-csi:master Sep 13, 2024
20 of 21 checks passed
@mpatlasov
Copy link
Contributor

@andyzhangx , this PR re-introduced the issue #834 back. Any directory without write permissions cannot be removed even with 0777 in file_mode/dir_mode. This behavior is easy to observe w/o k8s:

# mount -t cifs -o dir_mode=0777,file_mode=0777,username=jane,password=zz,vers=3.1.1,addr=127.0.0.1,uid=0,gid=0 //127.0.0.1/share /mnt
# mkdir /mnt/dir
# chmod a-w /mnt/dir
# rmdir /mnt/dir
rmdir: failed to remove '/mnt/dir': Permission denied

Should we return that recursive chmod back?

@andyzhangx
Copy link
Member Author

rmdir /mnt/dir

@mpatlasov this PR should fix the issue: #851

@mpatlasov
Copy link
Contributor

rmdir /mnt/dir

@mpatlasov this PR should fix the issue: #851

Works for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants