You are not logged in.
Hi guys. The other day I went to open visual studio code, didn't open. I try to open from terminal to see the output and got an error pertaining to permissions.
joe@LemBox ~ code
/usr/bin/code: line 11: /opt/visual-studio-code/bin/code: Permission denied
So, I'm reasonably okay with linux stuff. Definitely not an expert but I've been daily driving arch for about a year now so starting to get more comfy.
I googled the problem, but found no result. This could only mean one of two things, either the problem was specific to my system, or it was so new that no one had had it before. The secret third option of course is that I just don't know the right words to google..
I decided that hopefully it was the second option, it's AUR, sometimes things go wrong, it's okay, so I just changed the owner of /opt/visual-studio-code to myself, and did what I needed to do. (full permissions posted at the end)
I was willing to chalk this up to some kind of fluke, and just work around it, but today I had very similar issues with a package called pinta. In fact the exact same issue. HOWEVER the files I needed to take possession of this this were in /usr/lib/pinta
This wasn't affected all packages though, I've only found one other package so far that's broken in the same way, but that was incredibly obscure so could be a red herring.
I've obviously made some kind of monumental mess here, somehow, while trying to fix some other issue previously, and I'm willing to bet this will end in a reinstall now that I'm older and wiser.
However I'm really just trying to understand what exactly I've broken here and how. And, maybe, if there's a fix for it.
I have checked env | grep UMASK, and there's nothing returned. So don't think it's anything to do with that.
I have tried installing the aur package without an aur helper (I use yay) and had exactly the same symptom
Don't know enough to know what other information would be helpful, hope this is enough to get started.
Thanks in advance for your reading and help
The permissions for the inside of /opt/visual-studio-code/ look like this.
joe@LemBox /opt/visual-studio-code ll
total 233M
drwx------ 1 root root 30 Nov 13 19:51 bin
-rw------- 1 root root 164K Nov 13 19:51 chrome_100_percent.pak
-rw------- 1 root root 254K Nov 13 19:51 chrome_200_percent.pak
-rwx------ 1 root root 1.6M Nov 13 19:51 chrome_crashpad_handler
-rwx------ 1 root root 15K Nov 13 19:51 chrome-sandbox
-rwx------ 1 root root 184M Nov 13 19:51 code
-rw------- 1 root root 10M Nov 13 19:51 icudtl.dat
-rwx------ 1 root root 247K Nov 13 19:51 libEGL.so
-rwx------ 1 root root 2.5M Nov 13 19:51 libffmpeg.so
-rwx------ 1 root root 6.2M Nov 13 19:51 libGLESv2.so
-rwx------ 1 root root 4.6M Nov 13 19:51 libvk_swiftshader.so
-rwx------ 1 root root 2.2M Nov 13 19:51 libvulkan.so.1
-rw------- 1 root root 15M Nov 13 19:51 LICENSES.chromium.html
drwx------ 1 root root 706 Nov 13 19:51 locales
drwx------ 1 root root 28 Nov 13 19:51 resources
-rw------- 1 root root 5.8M Nov 13 19:51 resources.pak
-rw------- 1 root root 333K Nov 13 19:51 snapshot_blob.bin
-rw------- 1 root root 702K Nov 13 19:51 v8_context_snapshot.bin
-rw------- 1 root root 107 Nov 13 19:51 vk_swiftshader_icd.jsonThey do NOT look like this on my laptop, which is also a standard arch install.
joe@LemTop /opt/visual-studio-code ll
total 234M
drwxr-xr-x 2 root root 4.0K Nov 7 22:02 bin
-rw-r--r-- 1 root root 164K Nov 7 21:59 chrome_100_percent.pak
-rw-r--r-- 1 root root 254K Nov 7 21:59 chrome_200_percent.pak
-rwxr-xr-x 1 root root 1.6M Nov 7 21:59 chrome_crashpad_handler
-rwxr-xr-x 1 root root 15K Nov 7 21:59 chrome-sandbox
-rwxr-xr-x 1 root root 186M Nov 7 21:59 code
-rw-r--r-- 1 root root 10M Nov 7 21:59 icudtl.dat
-rwxr-xr-x 1 root root 247K Nov 7 21:59 libEGL.so
-rwxr-xr-x 1 root root 2.5M Nov 7 21:59 libffmpeg.so
-rwxr-xr-x 1 root root 6.2M Nov 7 21:59 libGLESv2.so
-rwxr-xr-x 1 root root 4.6M Nov 7 21:59 libvk_swiftshader.so
-rwxr-xr-x 1 root root 2.2M Nov 7 21:59 libvulkan.so.1
-rw-r--r-- 1 root root 15M Nov 7 21:59 LICENSES.chromium.html
drwxr-xr-x 2 root root 4.0K Nov 7 22:02 locales
drwxr-xr-x 4 root root 4.0K Nov 7 22:02 resources
-rw-r--r-- 1 root root 5.8M Nov 7 21:59 resources.pak
-rw-r--r-- 1 root root 333K Nov 7 21:59 snapshot_blob.bin
-rw-r--r-- 1 root root 702K Nov 7 21:59 v8_context_snapshot.bin
-rw-r--r-- 1 root root 107 Nov 7 21:59 vk_swiftshader_icd.jsonLast edited by Lemonade1947 (2025-11-14 09:10:27)
Offline
umask isn't an env variable, check it with the `umask` command.
Offline
umask comes back as 0022, that right?
Offline
Yes, and unlikely relevant.
findmnt -T "/opt/visual-studio-code-bin"SIdebars:
joe@LemBox /opt/visual-studio-code llThat's a different path?
Also please use [code][/code] tags.
Offline
That's a different path?
Also please use [code][/code] tags.
You're right that, was a typo. Have corrected original post for clarity.
Offline
findmnt -T "/opt/visual-studio-code-bin"
Point being that you might mount /opt/* to a non-posix FS or otherwise apply umask restrictions to the FS.
Offline
Are you installing the same package on both systems, or building it separately on each system?
Offline
seth wrote:findmnt -T "/opt/visual-studio-code-bin"Point being that you might mount /opt/* to a non-posix FS or otherwise apply umask restrictions to the FS.
joe@LemBox ~ findmnt -T "/opt/visual-studio-code"
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda2 btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/Are you installing the same package on both systems, or building it separately on each system?
I'm building and installing them both separately I suppose. I'm just using an AUR helper. (yay specifically) but I've tried building and installing using makepkg -f -si on the desktop, and get the same result.
I personally don't think it's a problem with the package or installing the package, and actually a config difference betwen the two machines.
Last edited by Lemonade1947 (2025-11-14 21:16:58)
Offline
returns nothing
Might be because of the create paths?
stat /opt/visual-studio-code-bin
ls /opt
findmnt -T /opt/visual-studio*Offline
returns nothing
Might be because of the create paths?
stat /opt/visual-studio-code-bin ls /opt findmnt -T /opt/visual-studio*
agh sorry you got there first. I realised I'd made the mistake a couple moments ago and updated the reply.
Offline
Dead end, though - /opt is on / is a btrfs subvol, nothing special about the permissions.
zcat /var/lib/pacman/local/<package-name-here>/mtreeYou can then pipe that into
curl -F 'file=@-' 0x0.stOffline
Dead end, though - /opt is on / is a btrfs subvol, nothing special about the permissions.
zcat /var/lib/pacman/local/<package-name-here>/mtreeYou can then pipe that into
curl -F 'file=@-' 0x0.st
did I do this right?
Offline
./opt/visual-studio-code/chrome_100_percent.pak time=1763078521.0 mode=600 size=167677 sha256digest=4ff385d888f7d16e4945c21cfa9596fd062022a9381d57451c97a22c33638d35It's the package.
Maybe the build location?
Offline
./opt/visual-studio-code/chrome_100_percent.pak time=1763078521.0 mode=600 size=167677 sha256digest=4ff385d888f7d16e4945c21cfa9596fd062022a9381d57451c97a22c33638d35It's the package.
Maybe the build location?
sorry what are you asking me?
Offline
Nothing.
I'm pointing out that the permissions are "wrong" in the package and suggesting that the cause of that might be where you're building the package (eg. a FAT or NTFS partition)
Offline
I'm not doing that as far as I'm aware. I'm either building them with yay, which seems to use "/home/joe/.cache/yay" for it's builds.
I've also tried building them manually, in which case I just git cloned the aur repo into my home dir and built it there.
So I don't see how it'd be possible.
Offline
findmnt -T /home/joe/.cache/yayOffline
joe@LemBox ~/.cache/yay findmnt -T /home/joe/.cache/yay
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda2 btrfs rw,relatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/Offline
Meh.
You'll have to check the build log, idk why the files end up w/ those permissions in the package but the problem happens when creating the package, not when installing it.
Offline
Is it possible this could actually be a problem with the AUR package and not my system?
I think that's unlikely since I haven't heard of anyone else having the issue, but just wondering if it's possible.
Offline
Which exact aur package is this?
What permissions do the files have when you extract the sources?
Offline
this is the package.
https://aur.archlinux.org/packages/visu … o-code-bin
What permissions do the files have when you extract the sources?
I'm not sure quite how to check that?
Offline
joe@LemBox ~/visual-studio-code-bin/pkg (master) ls
visual-studio-code-bin
joe@LemBox ~/visual-studio-code-bin/pkg (master) cd visual-studio-code-bin/
joe@LemBox ~/visual-studio-code-bin/pkg/visual-studio-code-bin (master) ll
total 208K
-rw------- 1 joe joe 67K Nov 14 00:02 .BUILDINFO
-rw-r--r-- 1 joe joe 416 Nov 14 00:02 .INSTALL
-rw------- 1 joe joe 129K Nov 14 00:02 .MTREE
drwx------+ 1 joe joe 36 Nov 14 00:02 opt
-rw------- 1 joe joe 943 Nov 14 00:02 .PKGINFO
drwx------+ 1 joe joe 16 Nov 14 00:02 usr
joe@LemBox ~/visual-studio-code-bin/pkg/visual-studio-code-bin (master) cd opt/
joe@LemBox ~/visual-studio-code-bin/pkg/visual-studio-code-bin/opt (master) ll
total 0
drwx------+ 1 joe joe 558 Nov 14 00:02 visual-studio-code
joe@LemBox ~/visual-studio-code-bin/pkg/visual-studio-code-bin/opt (master) cd visual-studio-code/
joe@LemBox ~/visual-studio-code-bin/pkg/visual-studio-code-bin/opt/visual-studio-code (master) ll
total 233M
drwx------+ 1 joe joe 30 Nov 14 00:02 bin
-rw------- 1 joe joe 164K Nov 14 00:02 chrome_100_percent.pak
-rw------- 1 joe joe 254K Nov 14 00:02 chrome_200_percent.pak
-rwx------ 1 joe joe 1.6M Nov 14 00:02 chrome_crashpad_handler
-rwx------ 1 joe joe 15K Nov 14 00:02 chrome-sandbox
-rwx------ 1 joe joe 184M Nov 14 00:02 code
-rw------- 1 joe joe 10M Nov 14 00:02 icudtl.dat
-rwx------ 1 joe joe 247K Nov 14 00:02 libEGL.so
-rwx------ 1 joe joe 2.5M Nov 14 00:02 libffmpeg.so
-rwx------ 1 joe joe 6.2M Nov 14 00:02 libGLESv2.so
-rwx------ 1 joe joe 4.6M Nov 14 00:02 libvk_swiftshader.so
-rwx------ 1 joe joe 2.2M Nov 14 00:02 libvulkan.so.1
-rw------- 1 joe joe 15M Nov 14 00:02 LICENSES.chromium.html
drwx------+ 1 joe joe 706 Nov 14 00:02 locales
drwx------+ 1 joe joe 28 Nov 14 00:02 resources
-rw------- 1 joe joe 5.8M Nov 14 00:02 resources.pak
-rw------- 1 joe joe 333K Nov 14 00:02 snapshot_blob.bin
-rw------- 1 joe joe 702K Nov 14 00:02 v8_context_snapshot.bin
-rw------- 1 joe joe 107 Nov 14 00:02 vk_swiftshader_icd.jsonIs this what you mean? It looks like they have the same permissions as appear on disk when installed (albeit a different owner)
Last edited by Lemonade1947 (2025-11-15 01:56:57)
Offline
Semi - actually the permissions inside code_x64_1.106.0.tar.gz
The install script seems to cp -r them, https://aur.archlinux.org/cgit/aur.git/ … de-bin#n79
Add --preserve=mode,links,timestamps to that if the permissions are correct in the src dir.
Last edited by seth (2025-11-15 08:44:53)
Offline