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

Permissions from deb archive are not preserved with non-zero umask #9

Closed
woky opened this issue Jun 17, 2022 · 0 comments
Closed

Permissions from deb archive are not preserved with non-zero umask #9

woky opened this issue Jun 17, 2022 · 0 comments

Comments

@woky
Copy link
Contributor

woky commented Jun 17, 2022

The permissions of /tmp directory in base-files packages are 01777:

$ apt-get download base-files
$ ar p base-files_12ubuntu4.1_amd64.deb data.tar.zst | tar --zstd -tvf - ./tmp
drwxrwxrwt root/root         0 2022-04-22 16:34 ./tmp/

However, chisel doesn't preserve it. Specifically, with default umask in Ubuntu, it removes write bit from others:

$ umask
0002
$ chisel cut --release $PWD --root $PWD/output  base-files_base
...
2022/06/17 12:41:53 Fetching pool/main/b/base-files/base-files_12ubuntu4_amd64.deb...
2022/06/17 12:41:53 Extracting files from package "base-files"...
$ ls -ld output/tmp
drwxrwxr-t 2 woky woky 4096 čen 17 12:41 output/tmp

As suggested in canonical/chisel-releases#3 (comment) this is probably an issue with umask. The following works:

$ umask 0
$ chisel cut --release $PWD --root $PWD/output  base-files_base
...
2022/06/17 12:45:30 Fetching pool/main/b/base-files/base-files_12ubuntu4_amd64.deb...
2022/06/17 12:45:30 Extracting files from package "base-files"...
$ ls -ld output/tmp
drwxrwxrwt 2 woky woky 4096 čen 17 12:45 output/tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant