Merge pull request #22460 from vitorgalvao/permission-denied

Breadcrumbs: permission denied error
This commit is contained in:
Vítor Galvão 2016-06-29 23:24:54 +01:00 committed by GitHub
commit 0c1fe9afea
4 changed files with 29 additions and 2 deletions

View File

@ -5,6 +5,7 @@
Possible reasons:
* [`curl` error](#curl-error)
* [`Permission denied` error](#permission-denied-error)
* [Unlisted reason](#unlisted-reason)
---
@ -13,7 +14,7 @@ Possible reasons:
If the error output includes something like
```bash
```
curl: (22) The requested URL returned error: 403 Forbidden
```
@ -27,6 +28,20 @@ the problem was with the downloading itself (see how the error came from `curl`)
---
#### `Permission denied` error:
If the output includes something like
```
Error: Permission denied - (/usr/local/Caskroom/someapp/0.1/Someapp.app, /Applications/Someapp.app)
```
the problem isnt with Homebrew-Cask itself, but some permissions on your system.
[Continue to the fix](permission_denied_error_fix_appdir.md)
---
#### Unlisted reason
If your issue isnt listed here, [go back](../../README.md#reporting-bugs) and pick `My problem isnt listed`.

View File

@ -6,4 +6,4 @@ Start by diagnosing your connection (try to download other casks, go around the
If youre sure the issue is not with your connection, contact the apps vendor and let them know their link is down, so they can fix it.
**Do not open an issue**.
**Do not open an issue.**

View File

@ -0,0 +1,7 @@
<sup><sub>[Go back](a_cask_fails_to_install.md#permission-denied-error)</sup></sub>
In this case, its likely youre a standard user and dont have permissions to write to `/Applications` (which is now our default). If you never changed your default installation directory for apps and were using Homebrew-Cask before we changed our behaviour to moving apps instead of linking, you should have some symlinks in your `~/Applications` directory, which you do have permission to write to.
You can use `--appdir=~/Applications` when installing to bring back the old behaviour. For a permanent change, [follow the `Options` section in `USAGE.md`](https://github.com/caskroom/homebrew-cask/blob/1de4657a0ed35463602b31061b0c16dc9078b8a0/USAGE.md#options). Specifically, youll want to set `export HOMEBREW_CASK_OPTS="--appdir=~/Applications"` in your shells startup file.
If `--appdir` doesnt fix the issue or you do have write permissions to `/Applications`, the problem may lie [in the app bundle itself](permission_denied_error_fix_bundle.md).

View File

@ -0,0 +1,5 @@
<sup><sub>[Go back](permission_denied_error_fix_appdir.md)</sup></sub>
Some app bundles dont have certain permissions that might be necessary for us to move them to the appropriate location. You may check such permissions with `ls -ls {{path_to_app_bundle}}`. If you see something like `dr-xr-xr-x` at the start of the output, that may be the cause. To fix it, we simply change the app bundles permission to allow us to move it, and then set it back to what it was (in case the developer set those permissions deliberately). See [`licoin`](https://github.com/caskroom/homebrew-cask/blob/0cde71f1fea8ad62d6ec4732fcf35ac0c52d8792/Casks/litecoin.rb#L14L20) for an example of such a cask.
If the issue persists, [go back](../../README.md#reporting-bugs) and pick `My problem isnt listed`. Be sure to mention all your steps so far and what youre having difficulties with.