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 permission for mounted directory #2261

Merged
merged 1 commit into from Jan 26, 2017
Merged

Conversation

absoludity
Copy link
Contributor

@absoludity absoludity commented Jan 17, 2017

Work-around for #2260 until the underlying problem is addressed (kubernetes/kubernetes#2630 - though not 100%).


This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 17, 2017
@absoludity absoludity changed the title Fix permission for mounted director #2260 Fix permission for mounted directory Jan 17, 2017
@foxish
Copy link
Contributor

foxish commented Jan 17, 2017

@absoludity, thanks for the fix. I would rather it be a separate statement explaining why it may be necessary to chmod permissions when using hostPath volumes.

@absoludity absoludity force-pushed the patch-2 branch 4 times, most recently from d9d2232 to 53ce822 Compare January 20, 2017 10:52
@absoludity
Copy link
Contributor Author

@foxish Let me know if that's more what you're after. Thanks

@foxish
Copy link
Contributor

foxish commented Jan 24, 2017

@enisoc @kow3ns PTAL

(due to a [bug when using hostPath volumes](https://github.com/kubernetes/kubernetes/issues/2630)) with:

```shell
for i in 0 1; do kubectl exec web-$i -- sh -c 'chmod 755 /usr/share/nginx/html'; done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need a shell to run chmod. It should work as just:

for i in 0 1; do kubectl exec web-$i -- chmod 755 /usr/share/nginx/html; done

Did you find that the permissions on index.html are fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @enisoc , I removed the sh as suggested.

Yes, the perms on index.html are fine:

michael@hpmor2:~/dev/k8s/statefulsets$ for i in 0 1; do kubectl exec web-$i -- ls -la /usr/share/nginx/html/; done
total 8
drwxr-xr-x 2 root root   60 Jan 25 09:23 .
drwxr-xr-x 4 root root 4096 Jan 16 06:20 ..
-rw-r--r-- 1 root root    6 Jan 25 09:23 index.html
total 8
drwxr-xr-x 2 root root   60 Jan 25 09:23 .
drwxr-xr-x 4 root root 4096 Jan 16 06:20 ..
-rw-r--r-- 1 root root    6 Jan 25 09:23 index.html

@enisoc
Copy link
Member

enisoc commented Jan 25, 2017

/lgtm

@k8s-ci-robot
Copy link
Contributor

@enisoc: you can't LGTM a PR unless you are an assignee.

In response to this comment:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@enisoc
Copy link
Member

enisoc commented Jan 25, 2017

/lgtm

@chenopis chenopis merged commit b26190b into kubernetes:master Jan 26, 2017
@kow3ns
Copy link
Member

kow3ns commented Jan 26, 2017

/lgtm


Comments from Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants