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

/usr/etc/defaults/useradd has strange permissions #1752

Closed
matyat opened this issue Feb 4, 2019 · 2 comments
Closed

/usr/etc/defaults/useradd has strange permissions #1752

matyat opened this issue Feb 4, 2019 · 2 comments

Comments

@matyat
Copy link

matyat commented Feb 4, 2019

Host system details

Provide the output of rpm-ostree status.

I don't think my host system is relevant right now, but will update if required.

$rpm-ostree --version
rpm-ostree:
 Version: '2019.1'
 Git: 46df99edaf65ee0f3fdf55b441caaaad19c1612d
 Features:
  - compose
  - rust

Expected vs actual behavior

$ ls -lh /usr/etc/default/useradd 
--w----r-T. 4 root root 123 Jan  1  1970 /usr/etc/default/useradd
$ stat -c "%a %n" /usr/etc/default/useradd 
1204 /usr/etc/default/useradd

Expected:

$ ls -lh /usr/etc/default/useradd 
-rw-r--r--. 4 root root 123 Jan  1  1970 /usr/etc/default/useradd
$ stat -c "%a %n" /usr/etc/default/useradd 
0644 /usr/etc/default/useradd

Interestingly 1204 in octal is 644 in decimal.

In fairness my use-case if fairly niche - I need to be able to read (to checksum) all the files in a ostree checkout when running as non-root. Using ostree checkout -U --repo=$repo $ref I end up with a file that my user cannot read from.

Steps to reproduce it

This seems to be with any image generated since #1726

Would you like to work on the issue?

I don't think I have the expertise to work on this!

cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Feb 4, 2019
Switching between programming languages can be a pain.  Unfortunate
that Rust happily accepts a leading `0` too.

Closes: coreos#1752
cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Feb 4, 2019
Switching between programming languages can be a pain.  Unfortunate
that Rust happily accepts a leading `0` too.

Closes: coreos#1752
@cgwalters
Copy link
Member

Sorry about that; PR in #1753

@matyat
Copy link
Author

matyat commented Feb 4, 2019

Thanks! I had to look up how to do octals in rust too

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

2 participants