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

hab pkg export .. masks insufficient write permission on the filesystem error #7035

Open
jeremymv2 opened this issue Oct 14, 2019 · 3 comments
Labels
Team:Habitat All issues tied to Chef habitat team Type: Bug Issues that describe broken functionality

Comments

@jeremymv2
Copy link
Contributor

jeremymv2 commented Oct 14, 2019

With hab version 0.85.0 and perhaps earlier versions, the hab pkg export <..> commands fail as expected when the user running the command does not have write permissions on the /hab filesystem.

However, the stated reason is a generic "not found" error message as opposed to the real insufficient permissions on the filesystem error.

[vagrant@chef-rpminstall ~]$ hab pkg export tar core/nginx
∵ Missing package for core/hab-pkg-export-tar/0.85.0
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
» Installing core/hab-pkg-export-tar/0.85.0
☁ Determining latest version of core/hab-pkg-export-tar/0.85.0 in the 'stable' channel
☛ Verifying core/hab-pkg-export-tar/0.85.0/20190916223634
✗✗✗
✗✗✗ `hab-pkg-export-tar' was not found on the filesystem or in PATH
✗✗✗

When run with the sudo command, the pkg export succeeds as expected.
We should bubble up the real error message to the user when that userid lacks filesystem write permission.

This does not appear to affect hab pkg install .. command. In the same scenario, it fails with the expected and correct error message:

✗✗✗
✗✗✗ Permission denied (os error 13)
✗✗✗
@christophermaier christophermaier added Type: Bug Issues that describe broken functionality and removed C-bug labels Jul 24, 2020
@stale
Copy link

stale bot commented Jul 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Jul 26, 2021
@rahulgoel1 rahulgoel1 added the Team:Habitat All issues tied to Chef habitat team label Jul 30, 2021
@stale stale bot removed the Stale label Jul 30, 2021
@stale
Copy link

stale bot commented Jul 31, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

1 similar comment
@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Habitat All issues tied to Chef habitat team Type: Bug Issues that describe broken functionality
Projects
None yet
Development

No branches or pull requests

3 participants