illixion / vscode-vibrancy-continued

Enable Acrylic/Glass effect for your VS Code.
MIT License
544 stars 31 forks source link

[Bug]: EACCES: permission denied #39

Closed usamasaleem1 closed 1 year ago

usamasaleem1 commented 1 year ago

Is there an existing issue for this?

Current Behavior

Command 'Reload Vibrancy' resulted in an error (A system error occurred (EACCES: permission denied, mkdir '/Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6'))

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- VSCode:
- Extension:

Anything else?

I have VSCode in my applications folder.

illixion commented 1 year ago

Seems like your VSCode was installed by another user, so your user account doesn't have permissions to modify it. To solve this, go to /Applications, find Visual Studio Code.app, right click → Get Info, and make sure that your account has Read & write permissions in the Sharing & Permissions section.

Edit: my previous solution doesn't solve the issue fully, running sudo chown -R $(whoami):staff "/Applications/Visual Studio Code.app/" in a terminal should fix this.

alessandro-newzoo commented 1 year ago

I'm having the same issue actually, and giving my user read/write permissions didn't help :(

image image image

I've also tried what's been suggested here: https://github.com/illixion/vscode-vibrancy-continued/issues/30#issuecomment-1277140078 but no dice sadly, the error still pops up.

And I've just tried running it with sudo:

$ sudo open /Applications/Visual\ Studio\ Code.app

Still no luck.

MacBook Pro M1 Pro
Ventura 13.0
VS Code v1.73.0 
illixion commented 1 year ago

Thanks for updating your comment, was about to ask if you're running Ventura as I haven't had the time to test it yet. Please try running these commands in the VSCode integrated terminal and post the output here:

stat "/Applications/Visual Studio Code.app/Contents/Resources/app/out/"
mkdir "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6"
touch "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6/index.js"
alessandro-newzoo commented 1 year ago

thanks for your prompt reply!

Here's the output:

❯ stat "/Applications/Visual Studio Code.app/Contents/Resources/app/out/"
16777234 3450645 drwxr-xr-x 12 root wheel 0 384 "Nov  4 11:30:12 2022" "Nov  4 11:30:12 2022" "Nov  4 11:30:12 2022" "Nov  1 23:51:22 2022" 4096 0 0 /Applications/Visual Studio Code.app/Contents/Resources/app/out/

❯ mkdir "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6"
mkdir: /Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6: Permission denied

❯ touch "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6/index.js"
touch: /Applications/Visual Studio Code.app/Contents/Resources/app/out/vscode-vibrancy-runtime-v6/index.js: No such file or directory
image
illixion commented 1 year ago

Interesting, your installation of VSCode seems to have been done by the root user. Did you use homebrew to install VSCode by any chance?

I've also just realized that my solution doesn't apply permissions to enclosed items, so to fix this run sudo chown -R $(whoami):staff "/Applications/Visual Studio Code.app/".

There's currently a PR open that adds sudo support to this extension, I'll try to review it and merge as soon as I have time, as it should fix this issue properly.

alessandro-newzoo commented 1 year ago

I've also just realized that my solution doesn't apply permissions to enclosed items, so to fix this run sudo chown -R $(whoami):staff "/Applications/Visual Studio Code.app/".

Yay this did the trick, thank you so much!

Interesting, your installation of VSCode seems to have been done by the root user. Did you use homebrew to install VSCode by any chance?

I should have mentioned it's a company-managed laptop (even though I have root access myself), and VS Code has been installed through a portal-like app my company provides where you can choose what to install from a set of predefined apps. So yeah, it probably runs brew in the backend!

illixion commented 1 year ago

No problem, glad to hear that this is resolved!

LamineGitHub commented 1 year ago

@illixion Please, I have the same problem but on a windows

illixion commented 1 year ago

@illixion Please, I have the same problem but on a windows

You probably have a system-wide installation of VSCode, run it as administrator before enabling Vibrancy.

usamasaleem1 commented 1 year ago

@illixion

image

Unfortunately, the command you gave does not run on my M1 machine. What am I doing wrong?

In addition, all the other steps you asked for did not work either.

illixion commented 1 year ago

@illixion image

Unfortunately, the command you gave does not run on my M1 machine. What am I doing wrong?

In addition, all the other steps you asked for did not work either.

The command in your screenshot is different from the one I’ve provided, you need to copy and paste it exactly as it appears in my comment. Also, make sure that you’re not using smart quotes in your commands. As long as you copy directly from your web browser into the Terminal, you should be fine.

Mr-Righteousdev commented 1 month ago

I have the same issue of permission denied when i try reload vibrancy command but i am using kali linux some help please ...

illixion commented 1 month ago

I have the same issue of permission denied when i try reload vibrancy command but i am using kali linux some help please ...

It's likely that VSCode files are owned by the root user on Kali Linux, you can run VSCode as root using sudo, or you can run chown -R $(whoami) /path/to/vscode on the directory where VSCode is installed to take ownership, it should also be in the error message.