Skip to content
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

$XDG_RUNTIME_DIR must have 0700 as permissions #836

Closed
1 task
GeorgeBekh opened this issue Nov 29, 2022 · 4 comments
Closed
1 task

$XDG_RUNTIME_DIR must have 0700 as permissions #836

GeorgeBekh opened this issue Nov 29, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@GeorgeBekh
Copy link

Operating System

Linux

What's the issue you encountered?

Run:
flatpak run net.werwolv.ImHex

Output:

[18:31:14] [INFO]  [main] Welcome to ImHex 1.25.0!
[18:31:14] [INFO]  [main] Native scaling set to: 1.2
[18:31:14] [ERROR] [main] Init task 'Creating directories' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[18:31:14] [ERROR] [main] Failed to load configuration! $XDG_RUNTIME_DIR must have 0700 as permissions
[18:31:14] [ERROR] [main] Init task 'Loading settings' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[18:31:14] [ERROR] [main] Init task 'Loading plugins' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[18:31:14] [INFO]  [main] Task 'Checking for updates' finished in 0 ms
[18:31:17] [INFO]  [main] Task 'Loading fonts' finished in 2750 ms

How can the issue be reproduced?

install ImHex from flatpak and run it

ImHex Version

1.25.0

ImHex Build Type

  • Nightly or built from sources

Installation type

flatpak

Additional context?

No response

@GeorgeBekh GeorgeBekh added the bug Something isn't working label Nov 29, 2022
@WerWolv
Copy link
Owner

WerWolv commented Nov 29, 2022

Hey
This is most likely an issue with your linux distro or your setup. Either your distro doesn't follow the XDG convention or you somehow messed up the permissions of those folders. I just tested it on my Arch machine and it works fine there.
Are you encountering any issues afterwards or does it just display these error messages?

In any case, probably not an ImHex issue.

@WerWolv WerWolv closed this as completed Nov 29, 2022
@LordGaav
Copy link

I can also reproduce this with the Flatpak version of ImHex 1.26.2 on Debian 11:

lordgaav@asura:~$ flatpak run net.werwolv.ImHex
[12:59:52] [INFO]  [main] Welcome to ImHex 1.26.2!
[12:59:52] [INFO]  [main] Native scaling set to: 1.0
[12:59:52] [INFO]  [main] Task 'Setting up environment' finished in 0 ms
[12:59:52] [ERROR] [main] Init task 'Creating directories' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[12:59:52] [ERROR] [main] Failed to load configuration! $XDG_RUNTIME_DIR must have 0700 as permissions
[12:59:52] [ERROR] [main] Init task 'Loading settings' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[12:59:52] [ERROR] [main] Init task 'Loading plugins' threw an exception: $XDG_RUNTIME_DIR must have 0700 as permissions
[12:59:52] [INFO]  [main] Task 'Checking for updates' finished in 0 ms
[12:59:54] [INFO]  [main] Task 'Loading fonts' finished in 1794 ms
terminate called after throwing an instance of 'xdg::BaseDirectoryException'
  what():  $XDG_RUNTIME_DIR must have 0700 as permissions

lordgaav@asura:~$ echo $XDG_RUNTIME_DIR
/run/user/1000

lordgaav@asura:~$ ls -la /run/user
total 0
drwxr-xr-x  3 root     root      60 14 jan 19:05 .
drwxr-xr-x 38 root     root     980 15 jan 12:03 ..
drwx------ 18 lordgaav lordgaav 540 15 jan 12:55 1000

The dir already has permissions 0700, but ImHex is convinced it's not.

@LordGaav
Copy link

Problem was solved for me by updating to Flatpak 1.14.1-1~bpo11+1 from the bullseye backports. Seems like an issue fixed in Flatpak 1.11.1: flatpak/flatpak#3397

@Stadtmusiker
Copy link

Stadtmusiker commented Mar 18, 2024

As mentioned by @WerWolv, this is a distro/setup issue. Self-heal. Here's another example from NixOS-WSL (may be ok in pure NixOS. See comment).

[nix-shell:~]$ nix-shell -p imhex
# (stdout stuff...)

[nix-shell:~]$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.18.1, channels(root): "nixos-23.11, nixos-wsl", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

[nix-shell:~]$ echo $XDG_RUNTIME_DIR
/run/user/1000/

[nix-shell:~]$ ls -l $XDG_RUNTIME_DIR/..
total 0
drwxr-xr-x 5 nixos users 180 Mar 18 21:06 1000

[nix-shell:~]$ imhex
terminate called after throwing an instance of 'xdg::BaseDirectoryException'
  what():  $XDG_RUNTIME_DIR must have 0700 as permissions
Aborted

ImHex worked for me after doing chmod 700 /run/user/1000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants