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

pkg -R should report EPERM earlier in detection #7

Open
mamurphy opened this issue Apr 14, 2016 · 1 comment
Open

pkg -R should report EPERM earlier in detection #7

mamurphy opened this issue Apr 14, 2016 · 1 comment

Comments

@mamurphy
Copy link
Member

pkg -R should report EPERM earlier in detection
"pkg -R / update" produces an EPERM error because it can read /var.
"pkg -R /zones/zonename/root update" doesn't because it can't read /zones/zonename/root/var.

mmurphy@global:~$ pkg -R / update -nv `cat packages.txt`
pkg: 0/1 catalogs successfully updated:

Could not operate on /var/pkg/publisher/ms.omniti.com/origins/953c354efa8f7f2a86f2edbf1c6c3c9875f62ba0/tmpLLkbkP
because of insufficient permissions. Please try the command again as a privileged user.
mmurphy@global:~$ pkg -R /zones/foo/root update -nv  `cat packages.txt`
pkg: No image rooted at '/zones/foo/root'
mmurphy@global:~$ zfs list | grep "foo/root"
data/zones/foo/ROOT/zbe-1                2.90G   717G  1.50G  /zones/foo/root
@danmcd
Copy link
Member

danmcd commented Apr 14, 2016

We need modules/client/image.py to throw PermissionsException instead of ImageNotFoundException when it's finding the image based on a -R argument to pkg(1). HOW we make that happen isn't immediately clear, but having the lower-level throw PermissionsException, and if it isn't already, having client.py catch that exception, is how we address this problem.

danmcd pushed a commit that referenced this issue Jan 10, 2017
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