Skip to content

[1.1] Fix tmpfs mode opts when dir already exists#3916

Merged
thaJeztah merged 1 commit intoopencontainers:release-1.1from
neersighted:backport_3912
Jun 28, 2023
Merged

[1.1] Fix tmpfs mode opts when dir already exists#3916
thaJeztah merged 1 commit intoopencontainers:release-1.1from
neersighted:backport_3912

Conversation

@neersighted
Copy link
Contributor

This is a backport of #3912 to the release-1.1 branch. Original description follows.


When a directory already exists (or after a container is restarted) the perms of the directory being mounted to were being used even when a different permission is set on the tmpfs mount options.

This prepends the original directory perms to the mount options. If the perms were already set in the mount opts then those perms will win.
This eliminates the need to perform a chmod after mount entirely.

Fixes #3911

When a directory already exists (or after a container is restarted) the
perms of the directory being mounted to were being used even when a
different permission is set on the tmpfs mount options.

This prepends the original directory perms to the mount options.
If the perms were already set in the mount opts then those perms will
win.
This eliminates the need to perform a chmod after mount entirely.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 9fa8b9d)
Resolved conflicts:
	tests/integration/run.bats
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
@kolyshkin kolyshkin added this to the 1.1.8 milestone Jun 28, 2023
@kolyshkin kolyshkin added the backport/1.1-pr A backport PR to release-1.1 label Jun 28, 2023
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.1-pr A backport PR to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants