protonscr

Trying to launch a game on an NTFS drive fails

protonopen
ValveSoftware/Proton#11 · opened 2018-08-22 by hcorion · updated 2023-02-05 · 19 comments · github
Hhcorion 2018-08-22 github

I have two steam library folders, one on my SSD, located at ~/.local/share/Steam, and one stored on my HDD, mounted at /mnt/hd, the HDD one is set to default. It seems that Proton installs to the default folder, /mnt/hd/SteamLibrary-linux/steamapps/common/Proton 3.7/.
Trying to launch A Hat in Time fails with the following

Traceback (most recent call last):
  File "/mnt/hd/SteamLibrary-linux/steamapps/common/Proton 3.7/proton", line 89, in <module>
    tar.extractall(path=basedir + "/dist")
  File "/usr/lib/python2.7/tarfile.py", line 2081, in extractall
    self.extract(tarinfo, path)
  File "/usr/lib/python2.7/tarfile.py", line 2118, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/usr/lib/python2.7/tarfile.py", line 2202, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/usr/lib/python2.7/tarfile.py", line 2280, in makelink
    os.symlink(tarinfo.linkname, targetpath)
OSError: [Errno 22] Invalid argument

EDIT: Some more information:
SSD is ext4
HDD is ntfs-3g
OS: Arch Linux
Python 2 and 3 are installed.

Ssbmn 2018-08-22 github

Exact same issue. Python 3 is installed and the drive has rwx perms

Hhcorion 2018-08-22 github

the issue might be with ntfs, @sbmn what format is your secondary drive?

Mmeowmeowfuzzyface 2018-08-22 github

Same issue on Ubuntu 18.04.1. Error log contains the exact same error. Tried with Doom (2016), Quake, and Doom 2. OS drive is ext4, games are installed on an NTFS drive mounted with the following options:
ntfs-3g defaults,exec,uid=1000,gid=1000,windows_names,locale=en_US.UTF-8 0 0

TTheGreatMcPain 2018-08-22 github

I was able to get around this same error by removing windows_names from my ntfs drive's mount options.

Apparently some of the file names in 'proton_dist.tar.gz' are not compatible with Windows' ntfs naming restrictions.

Llinkjay 2018-08-22 github

Try using that ntfs-3g command without windows_names or locale. You shouldn't need either and according to TheGreatMcPain, they only cause more issues.

ntfs-3g defaults,exec,uid=1000,gid=1000

Mmeowmeowfuzzyface 2018-08-22 github

Removing "windows_names" from fstab fixed it. Left locale in there without problems. On a side note, the official Ubuntu documentation for mounting NTFS drives says to use the windows_names option, so I think this is an issue that will come up a lot in the future for dual-booters.

TTheGreatMcPain 2018-08-22 github

The only issue that would come up is when windows can't move, copy, or delete a file because it has a character in it's name that Windows doesn't like. I do believe windows can still open those files like normal though.

Mmeowmeowfuzzyface 2018-08-22 github

I meant that this is an issue that I think a lot of users will run into because the official Ubuntu documentation instructs users to use the "windows_names" mount option in the fstab entry, and Ubuntu's automated method to add NTFS drives to fstab includes the "windows_names" option by default. But it's good to know that removing it shouldn't cause any major issues on the Windows installation.

Thank you both for your help. I hope this solution works for OP as well.

Ssbmn 2018-08-23 github

Solution worked.

Ssir-maniac 2018-08-30 github

I can confirm symlinking compatdata and 'common/Proton 3.7' to my ext4 filesystem worked. I also had to increase my open file ulimit.

@aeikum have you considered patching the wine source code to allow an alternative symbol?

I've examined the code and a patch seems pretty trivial, mostly involving mountmgr.sys and a couple of dlls that directly create the symlinks (ntdll.dll, kernel32.dll).

If you like I can offer a pull request for the modification.

Ppeterson432 2019-03-22 github

Try to run ntfs-3g command without names or locale,
ntfs-3g defaults,exec,uid=1000,gid=1000

Kkisak-valve maintainer 2019-06-08 github

Noted at https://github.com/ValveSoftware/Proton/issues/2775#issuecomment-499477244, upstream wine has a prefix ownership check which may have been added due to past issues with the user creating the prefix as root and then having issues accessing the prefix later.

Running Steam as root is explicitly unsupported and blocked in its startup script, so that particular scenario would require a bad actor to make a folder that the current user can't manipulate, but there may be other methods leading to permission issues that need to be considered.

Mmadewokherd 2019-06-10 github

We should at least be able to detect some of these situations (can't create c: symlink, can't create a prefix with the correct ownership, existing prefix has wrong ownership) and report an error. Is there a way we can report an error message back to steam, or failing that can we assume the presence of something like xmessage or zenity?

XXinayder 2019-12-07 github

IIf it is of any help, I have some log files and crash dumps after I tried running Elder Scrolls Online on my Linux install on an NTFS drive mounted with windows_names.

eso_crash.zip

WWenzel 2020-02-17 github

Hi, got the same issue, removed windows_names and it works fine now.

Thanks !

SSomeoneIsWorking 2022-01-06 github

Hi, got the same issue, removed windows_names and it works fine now.

On Ubuntu + Lutris. I had to do the opposite to solve it. Which was to add the windows_names that wasn't there before.
Can't figure out how to do it in kubuntu though because it is mounting as fuseblk and unmounting and remounting with ntfs-3g -o windows_names didn't help

EDIT: HOLD ON, windows_names has nothing to do with handling case preserving naming. I had no idea.
My games fail to launch because of name case differences. I thought windows_names solves it because it DID on Ubuntu but that makes no sense because the option has nothing to do with it. This is some seriously confusing stuff for me.

Gghabit 2023-02-05 github

I was able to get around this same error by removing windows_names from my ntfs drive's mount options.

Apparently some of the file names in 'proton_dist.tar.gz' are not compatible with Windows' ntfs naming restrictions.

Can I have some more explanation what 'windows_names' means? I have same issue, but can't get it.

SSomeoneIsWorking 2023-02-05 github

I was able to get around this same error by removing windows_names from my ntfs drive's mount options.
Apparently some of the file names in 'proton_dist.tar.gz' are not compatible with Windows' ntfs naming restrictions.

Can I have some more explanation what 'windows_names' means? I have same issue, but can't get it.

Sorry, apparently windows_names has nothing to do with it, the problem was still happening randomly in GeniusEggroll version and I got around it by switching to a regular lutris version.

Gghabit 2023-02-05 github

fsck under windows solved issue for me

Proton versions

Upstream links

DLLs