-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Check for temp directory write permission before downloading binary #501
Comments
/add label: proposal |
@alexellis Can you please take a look at this? 🙂 |
Sounds good to me, do you want to try it out in a PR? |
@alexellis I will create a draft PR |
Thanks @yankeexe, no need to make it a draft however. |
I can open this as a new bug if needed, but seeing as it's closely related to this issue...
E.g (when running arkade as non-root user):
Or in reverse:
|
Hi @mrichar1 I've seen this a few times when I've put my own files into /tmp that conflict on name. A unique tempdir name would get around that, I don't have a problem with you sending a PR. What brought you here? Did you run into this issue yourself? Alex |
Yes - I hit this when switching from running as root to running non-root, and was looking through existing issues to see if it had already been reported. Happy to have a go at drafting a separate PR for this. |
Thanks a PR would be great @mrichar1 |
Check if the user has permission to write to
$TMPDIR
before downloading binary. Else the following issue occurs:$~ arkade get inletsctl Downloading inletsctl https://github.com/inlets/inletsctl/releases/download/0.8.2/inletsctl.tgz Error: check with the vendor whether this tool is available for your system: open /tmp/inletsctl.tgz: permission denied
Expected Behaviour
If the user running
arkade
does not have permission to write to$TMPDIR
, show error messaging stating such.Current Behaviour
Shows Binary Download prompt and fails on accessing
$TMPDIR
to store binary.Are you a GitHub Sponsor (Yes/No?)
Check at https://github.com/sponsors/alexellis
Possible Solution
Check for writable permission to
$TMPDIR
before downloading the binarySteps to Reproduce (for bugs)
mkdir test-temp
chmod 100 test-temp
export TMPDIR=<absolute-path-to-'test-temp'-directory>
arkade get <any-binary>
Your Environment
The text was updated successfully, but these errors were encountered: