Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Trying to launch a game on an NTFS drive fails

Open hcorion opened this issue 8 years ago • 19 comments

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.

hcorion avatar Aug 22 '18 00:08 hcorion

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

sbmn avatar Aug 22 '18 01:08 sbmn

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

hcorion avatar Aug 22 '18 03:08 hcorion

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

meowmeowfuzzyface avatar Aug 22 '18 03:08 meowmeowfuzzyface

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.

TheGreatMcPain avatar Aug 22 '18 05:08 TheGreatMcPain

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

linkjay avatar Aug 22 '18 07:08 linkjay

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.

meowmeowfuzzyface avatar Aug 22 '18 10:08 meowmeowfuzzyface

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.

TheGreatMcPain avatar Aug 22 '18 13:08 TheGreatMcPain

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.

meowmeowfuzzyface avatar Aug 22 '18 17:08 meowmeowfuzzyface

Solution worked.

sbmn avatar Aug 23 '18 13:08 sbmn

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.

sir-maniac avatar Aug 30 '18 16:08 sir-maniac

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

peterson432 avatar Mar 22 '19 07:03 peterson432

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.

kisak-valve avatar Jun 08 '19 15:06 kisak-valve

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?

madewokherd avatar Jun 10 '19 14:06 madewokherd

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

Xinayder avatar Dec 07 '19 13:12 Xinayder

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

Thanks !

Wenzel avatar Feb 17 '20 10:02 Wenzel

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.

SomeoneIsWorking avatar Jan 06 '22 20:01 SomeoneIsWorking

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.

ghabit avatar Feb 05 '23 17:02 ghabit

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.

SomeoneIsWorking avatar Feb 05 '23 17:02 SomeoneIsWorking

fsck under windows solved issue for me

ghabit avatar Feb 05 '23 17:02 ghabit