NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

"Permission denied" running `er-patcher` #214134

Open l0b0 opened 1 year ago

l0b0 commented 1 year ago

Describe the bug

Running any seemingly valid er-patcher command seems to result in the same issue:

$ er-patcher -- %command%
/etc/profiles/per-user/username/bin/er-patcher:133: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  f.link_to(game_dir_patched / f)
Traceback (most recent call last):
  File "/etc/profiles/per-user/username/bin/er-patcher", line 138, in <module>
    subprocess.run(steam_cmd, cwd=steam_cmd[-1].parent.absolute())
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: PosixPath('/mnt/foo/SteamLibrary/steamapps/common/ELDEN RING/Game/er-patcher-tmp/eldenring.exe')

Steps To Reproduce

Steps to reproduce the behavior:

  1. Verify integrity of game files in Steam
  2. cd into the Elden Ring Game directory
  3. Run er-patcher -- %command%

Expected behavior

Should run the game.

Additional context

I have unpacked Elden Mod Loader 3.2 into my Game folder, in case that's relevant.

See also https://github.com/techiew/EldenRingModLoader/issues/8.

Making the relevant files executable results in a different error, which looks like it's trying to run eldenring.exe directly without WINE:

$ chmod a+x dinput8.dll eldenring.exe er-patcher-tmp/eldenring.exe 
$ er-patcher -- %command%
/etc/profiles/per-user/username/bin/er-patcher:133: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  f.link_to(game_dir_patched / f)
Traceback (most recent call last):
  File "/etc/profiles/per-user/username/bin/er-patcher", line 138, in <module>
    subprocess.run(steam_cmd, cwd=steam_cmd[-1].parent.absolute())
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: PosixPath('/mnt/foo/SteamLibrary/steamapps/common/ELDEN RING/Game/er-patcher-tmp/eldenring.exe')

Notify maintainers

@IvarWithoutBones

Metadata

l0b0 commented 1 year ago

Looks like I can't run er-patcher from the command line, but changing the launch options within Steam to er-patcher -c -v -s -- %command% worked. This should probably be documented.