Skip to content

Fix directory perms vs umask for tmpcopyup#4056

Merged
lifubang merged 1 commit into
opencontainers:mainfrom
kolyshkin:umask-II
Oct 5, 2023
Merged

Fix directory perms vs umask for tmpcopyup#4056
lifubang merged 1 commit into
opencontainers:mainfrom
kolyshkin:umask-II

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Oct 4, 2023

Bump fileutils to v0.5.1, which fixes permissions of newly created directories to not depend on the value of umask (see mrunalp/fileutils#9).

Add a test case which fails like this before the fix:

        mounts.bats
         ✗ runc run [tmpcopyup]
           (in test file tests/integration/mounts.bats, line 28)
             `[[ "${lines[0]}" == *'drwxrwxrwx'* ]]' failed
           runc spec (status=0):

           runc run test_busybox (status=0):
           drwxr-xr-x    2 root     root            40 Oct  4 22:35 /dir1/dir2

Fixes #3991.

@kolyshkin kolyshkin added the backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 label Oct 4, 2023
@kolyshkin

This comment was marked as outdated.

Bump fileutils to v0.5.1, which fixes permissions of newly created directories
to not depend on the value of umask.

Add a test case which fails like this before the fix:

	mounts.bats
	 ✗ runc run [tmpcopyup]
	   (in test file tests/integration/mounts.bats, line 28)
	     `[[ "${lines[0]}" == *'drwxrwxrwx'* ]]' failed
	   runc spec (status=0):

	   runc run test_busybox (status=0):
	   drwxr-xr-x    2 root     root            40 Oct  4 22:35 /dir1/dir2

Fixes 3991.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Copy Markdown
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

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

LGTM

@lifubang lifubang merged commit 141835c into opencontainers:main Oct 5, 2023
@kolyshkin kolyshkin added backport/1.1-done A PR in main branch which has been backported to release-1.1 and removed backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 labels Oct 5, 2023
@kolyshkin
Copy link
Copy Markdown
Contributor Author

1.1 backport: #4060.

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

Labels

backport/1.1-done A PR in main branch which has been backported to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong directory permissions when using tmpcopyup because of umask

4 participants