diff --git a/doc/reporting_bugs/a_cask_fails_to_install.md b/doc/reporting_bugs/a_cask_fails_to_install.md index 519c408c44c..91d1ba5c44c 100644 --- a/doc/reporting_bugs/a_cask_fails_to_install.md +++ b/doc/reporting_bugs/a_cask_fails_to_install.md @@ -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 isn’t 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 isn’t listed here, [go back](../../README.md#reporting-bugs) and pick `My problem isn’t listed`. diff --git a/doc/reporting_bugs/curl_error_fix_wont_fix.md b/doc/reporting_bugs/curl_error_fix_wont_fix.md index 77616f2cffa..c02b9adfec6 100644 --- a/doc/reporting_bugs/curl_error_fix_wont_fix.md +++ b/doc/reporting_bugs/curl_error_fix_wont_fix.md @@ -6,4 +6,4 @@ Start by diagnosing your connection (try to download other casks, go around the If you’re sure the issue is not with your connection, contact the app’s vendor and let them know their link is down, so they can fix it. -**Do not open an issue**. +**Do not open an issue.** diff --git a/doc/reporting_bugs/permission_denied_error_fix_appdir.md b/doc/reporting_bugs/permission_denied_error_fix_appdir.md new file mode 100644 index 00000000000..fcee7fd7381 --- /dev/null +++ b/doc/reporting_bugs/permission_denied_error_fix_appdir.md @@ -0,0 +1,7 @@ +[Go back](a_cask_fails_to_install.md#permission-denied-error) + +In this case, it’s likely you’re a standard user and don’t 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, you’ll want to set `export HOMEBREW_CASK_OPTS="--appdir=~/Applications"` in your shell’s startup file. + +If `--appdir` doesn’t 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). diff --git a/doc/reporting_bugs/permission_denied_error_fix_bundle.md b/doc/reporting_bugs/permission_denied_error_fix_bundle.md new file mode 100644 index 00000000000..7b23eef0ad2 --- /dev/null +++ b/doc/reporting_bugs/permission_denied_error_fix_bundle.md @@ -0,0 +1,5 @@ +[Go back](permission_denied_error_fix_appdir.md) + +Some app bundles don’t 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 bundle’s 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 isn’t listed`. Be sure to mention all your steps so far and what you’re having difficulties with.