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

Inability to pull from sysrepo to a user repo #1562

Open
puiterwijk opened this issue Apr 30, 2018 · 5 comments
Open

Inability to pull from sysrepo to a user repo #1562

puiterwijk opened this issue Apr 30, 2018 · 5 comments

Comments

@puiterwijk
Copy link

puiterwijk commented Apr 30, 2018

I have tried about all bare repo types to pull from /sysroot/ostree/repo to a repo in my home directory, which is on local ext4.

With bare, I get: error: Importing 109f5eddff73e261a92d38a8a1fd7ec9d1f9c9f39dd7a3fe36e43c7aa10116c6.commit: fchown: Operation not permitted (this one is expected, as that's what "user" is for).

With bare-user, I get: error: openat: Permission denied.

With bare-user-only, I get: error: Writing content object: Content object 705f6478e11292040aa66c3df5f0c03d23af0c879ff0de34a3a806217d50654b: invalid mode 0104755 with bits 04000.

With archive-z2, I get: error: openat: Permission denied.

The commands I'm running:

ostree init --repo=. --mode=<type>
ostree pull-local /sysroot/ostree/repo "fedora-workstation/fedora/rawhide/x86_64/workstation"
@cgwalters
Copy link
Member

"in my home directory" implying as non-root? The only type that will work in theory in this case is bare-user. What you're probably hitting is a variant of the mode 0 /etc/shadow files - see coreos/rpm-ostree#1045 and #989 etc.

The shadow files are really a super painful corner case - otherwise a lot of non-root stuff would Just Work. So hopefully we'll get around to doing them via tmpfiles or so.

@cgwalters
Copy link
Member

(The reason I haven't prioritized changing how /etc/shadow works is having to change PAM, plus the fact that today at least rpm-ostree requires root for composes by default, and while we made a lot of progress for unified core as usual the last 10% is 40% of the work, etc.)

@dustymabe
Copy link
Contributor

"in my home directory" implying as non-root? The only type that will work in theory in this case is bare-user.

yes, that's what he was doing

What you're probably hitting is a variant of the mode 0 /etc/shadow files - see coreos/rpm-ostree#1045 and #989 etc.

Is there an easy way to verify that is the issue he is hitting?

cgwalters added a commit to cgwalters/ostree that referenced this issue Apr 30, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
ostreedev#1562
@cgwalters
Copy link
Member

Is there an easy way to verify that is the issue he is hitting?

#1564 will make the error message a bit clearer.

rh-atomic-bot pushed a commit that referenced this issue Apr 30, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
@cgwalters
Copy link
Member

Also I was wrong, archive (aka archive-z2) should work fine too aside from the unreadable files.

Another thing to keep in mind of course is that since archive is compressed, it's closer to e.g. RPM or zip file etc. that one can transport around as non-root easily. The advantage of bare-user is when one wants to do checkouts.

rh-atomic-bot pushed a commit that referenced this issue Apr 30, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue May 1, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue May 1, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue May 1, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue May 1, 2018
This would have debugged trying to do a pull as non-root from
a sysroot repository.  See for example:
#1562

Closes: #1564
Approved by: jlebon
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

3 participants