You are not logged in.
I googled around to set my fstab up so that I could have linux compatible permissions on my NTFS hard drives which I share between windows and linux both for file storage, and for video games.
this is my result (for two drives in question)
/dev/sdb2 /media/Storage ntfs-3g auto,users,exec,permissions 0 0
/dev/sdc1 /media/Games ntfs-3g auto,users,exec,permissions 0 0This worked out just fine for linux, and booting into windows it seemed to be working fine there as well. But then I installed some more games on it (I installed both Hawken and Trackmania Nations Forever through steam for example) and they refuse to execute on windows, windows giving me a permission error: "Windows cannot access the specified device, path, or file" error when you try to install, update or start a program or file"
I tried manually setting the permissions from within windows for the folders but that did not save me this time like it normally would have. Windows' CHKDSK also just said everything was fine with the drives.
I am sort of getting the feeling that the only way to solve this from within windows would be to format the hard drives which I would rather avoid.
Has anyone encountered this problem before or have an idea about how I could solve it?
Edit: I found a solution!
The solution for this was to reset the NTFS permissions. To do so, run Windows' Command Prompt as administrator and type in
(use "cd" to navigate to the folder from which you want to reset all permissions, in my case I could point it towards the folder my game executables are located in, in the example below I navigate to drive "D:/" and reset permissions on everything in there, this does not take long even if my D: drive is a nearly fully loaded 3Tb partition)
cd /D D:
icacls * /T /Q /C /RESETAnd there, (hot)fixed.
Last edited by rabcor (2014-04-19 20:59:31)
Offline
@rabcor: I have exactly the same problem. Thank you for sharing your hot fix. But before I try it on my system, do you mind sharing a bit more about your setting and situation? Do you use the so-called UserMapping file? With the permissions option, do files you create on Linux correspond to the correct owner and group? As far as I can see from the section on Ownership and Permissions of the NTFS-3G documentation, the interplay between file access and creation looks so complicated. And finally and most importantly, does your hot fix solve the problem once or once for all? I mean, do you encounter the problem again in future dual booting? I will appreciate a lot your answer since I have been struggling with the problem for days.
Last edited by reflectionalist (2014-08-27 19:31:36)
Offline
Well you could just test it to find out, I don't use the UserMapping file, I don't even know what that is. All I know is my mount options in Fstab.
This solution does not solve the problem once and for all, it just solves the problem for all existing files on the NTFS partition, you can run into it again (but if you do, all you have to do is just run this command again to hotfix it again, that's why it's just a hotfix) I'm not exactly sure how or why the problem crops up again, I haven't really troubleshot this thoroughly, I don't use windows that much and running this command to fix my problem since it takes such a short time isn't really that painful of a solution. I imagine there might be a better way to mount NTFS so that this problem doesn't occur though, I think I had a method like that at some point but I don't remember. You can ask around for it if you want (I think that would be the only way to permanently solve the problem, since it occurs because of the way Linux permissions are incompatible with NTFS/Windows permisssions)
But I don't reallly encounter this problem often beyond the first time, but I can expect it to happen for example if I placed files on the drive from Linux that I can't open them from windows until after I run the fix.
One easy way to avoid this problem though is to mount the NTFS partition in Linux as read only, or without permissions (as you can see in my fstab line, one of the options I used is called "permissions", this is what causes the problem, but it is pretty much required if I want to be able to execute software that is instaleld on the drive, and in my case I install all my steam games on a shared NTFS partition since Windows doesn't support Ext to any sane degree, but I also have another hard drive which is smaller and I only install Windows games onto that hard drive, so Linux doesn't need to be able to execute files in there and therefore doesn't need a functional permissions table)
Last edited by rabcor (2014-10-24 22:14:09)
Offline
A bit of an update on this, I think I have discovered how this issue works to some degree, basically files/folders edited or created on Linux, will have read-only access on Windows and will stay that way unless you run the command I mentioned to reset the file permissions for the directory and all sub directories (so you don't always have to run the command to clear out "all" of your drive as I did in the OP, lets say I create D:\Movies\ on Linux, and I want to be able to add files to that folder from windows, I should be able to fix the permissions for that directory by running things this way instead:
cd /D D:
icacls Movies\* /T /Q /C /RESETor by cding into the movies folder instead.)
I think it is also possible to access these folders/files with corrupted permissions by doing it as an administrator. (For example with UAC I was able to create a folder in a folder that I had created in linux, but could not add files to it as a normal user) although I haven't tried this; disabling UAC on Windows might be an alternative solution to this problem (ntfs-3g was apparently created with Windows XP in mind which did not have UAC) but I can't recommend this since it allows every program to run as administrator. It's like using linux with only your root account, completely unsafe.
The problem comes from the "permissions" option in fstab which allows linux to edit permissions on the NTFS drive, and apparently whenever this is done from Linux, it corrupts the permissions on the windows-side for the file/folder that got it's permissions from Linux. If you can live without the permissions option, then remove it from fstab and you won't have to deal with this problem again. If not, surely there must be a way to minimize the cases where this problem can occur.
Last edited by rabcor (2015-11-26 12:06:20)
Offline