Cannot open file in NTFS filesystem on Ubuntu Hardy Heron

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

Cannot open file in NTFS filesystem on Ubuntu Hardy Heron

Post by jcobban3 »

I am trying to run an old version of Family Tree Maker for Windows. I got it working on Ubuntu Gutsy Gibbon, but when I switched to Hard Heron it stopped working.

Specifically when I use the file open dialog to select the database to open I am able to navigate through the Unix directory tree down to the file, but when I request the application to open the selected file I get an error message "Cannot find file". I look in the ftw.ini file, where the application saves the path to the most recently opened file and the path is correct. The application just cannot open the file using that path. I tried two different routes to the file: tracing down from the mount point of the NTFS file system containing the file, and also following a soft link from my home directory over to the folder containing the file on the NTFS file system. The only way I can open the file is to copy it over to my linux home directory. I would prefer to share a single copy of the database between Windows and Linux so I do not have to keep copying it back and forth to keep it in synch.

Any ideas of why opening a file on an NTFS file system would not work on Hardy Heron?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

Any ideas of why opening a file on an NTFS file system would not work on Hardy Heron?
Offhand, I can think of two ntfs-g driver (not Wine) issues that could cause this:

1. the partition is mounted "noexec" (the default)
2. the app requires shared writable mmap, support for which wasn't added to the Linux kernel until 2.6.26.

If it's the first, editing your /etc/fstab to add "exec" to the end of the mount options for the partition in question should solve the problem. If it's the second, your solution is to upgrade to a kernel that supports shared writable mmap.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

One other thing...have you checked the file permissions? If you haven't, do that first.
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

NTFS

Post by jcobban3 »

I am a bit rusty because it has been a few years since I last worked extensively on UNIX but I think I understand what you are getting at.

I just installed Ubuntu and permitted it to set up the configuration. When I look at /etc/fstab I don't see any of the hard disk partitions described in it, not even the main file system.

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=f900070e-2701-4360-98c3-68bc817d012b / ext3 relatime,errors=remount-ro 0 1
# /dev/sdb5
UUID=d8a7d02f-441c-4d94-8db3-df02963da66b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

As I understand the above both the main file system and the swap entry are commented out, and there is no entry whatsoever for the Windows partition. Yet in the running system /dev/sdb1 is mounted on /media/disk and /dev/sda1 (the Windows NTFS partition) is mounted on /media/disk-1. You will appreciate that being rusty on linux I am cautious about mucking around in these configuration files. I don't want the automount daemon that is obviously fixing up my configuration to get into a fight with fstab. I suspect, although I no longer have a copy of it to check, that the previous release of Ubuntu did a hard mount through fstab, and that would explain why the program worked in that release, and not in this one.
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

Still cannot open file on NTFS partition

Post by jcobban3 »

I have changed /etc/fstab to explicitly mount the NTFS file system. This corrects a number of other problems I have had on Ubuntu HH but I still cannot open the file on the NTFS partition from my program running under Wine. The line I added to /etc/fstab is:

# /dev/sda1
UUID=5EA41B7AA41B543D /media/disk-1 ntfs-3g relatime,errors=remount-ro 0 1

This is identical to the mount for the main file system except for the UUID, mount point, and type.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Still cannot open file on NTFS partition

Post by vitamin »

jcobban3 wrote:I have changed /etc/fstab to explicitly mount the NTFS file system. This corrects a number of other problems I have had on Ubuntu HH but I still cannot open the file on the NTFS partition from my program running under Wine. The line I added to /etc/fstab is:

# /dev/sda1
UUID=5EA41B7AA41B543D /media/disk-1 ntfs-3g relatime,errors=remount-ro 0 1

This is identical to the mount for the main file system except for the UUID, mount point, and type.
That won't work. By default only root has access to such mount. ntfs section of 'man mount' will explain details.
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

NTFS mount

Post by jcobban3 »

Thank you for the pointer. I understand the point of the uid, gid, and umask options on the mount of an NTFS file system. Since NTFS does not support the UNIX file permissions model it must be emulated. uid permits specifying the userid that will appear to be the owner of the files, for example. However this only effects who can change the permissions on files in the NTFS partition. The default behaviour of ntfs-3g permits anyone to read, update, and execute files in the partition. When I issue ls -l against any file in the partition it displays:

-rwxrwxrwx 2 root root ...

Furthermore I have updated many files within the partition using various linux based tools. The only program that fails is this one I am trying to run under Wine. Note that the file dialog has no problem traversing the folder hierarchy.

Perhaps I need to collect more documentation. Should I enable some of the Wine debug options to understand why this application is unable to open the file?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: NTFS mount

Post by vitamin »

jcobban3 wrote:Perhaps I need to collect more documentation. Should I enable some of the Wine debug options to understand why this application is unable to open the file?
Run your program from the terminal and post everything you see.
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

NTFS mount problem

Post by jcobban3 »

The output is:

jcobban@jcobban-desktop:~$ wine "/home/jcobban/.wine/drive_c/Program Files/FTW/Ftw.exe"
fixme:storage:StorageImpl_Commit (0x18cea8 1): stub
err:virtual:map_file_into_view shared writable mmap not supported, broken filesystem?
err:virtual:NtMapViewOfSection map_file_into_view 0x63d0000 20000 000000000 failed
fixme:storage:StorageImpl_Commit (0x18cea8 1): stub
fixme:storage:StorageImpl_Commit (0x18cea8 3): stub

In an earlier posting dimesio mentioned that "shared writable mmap, support ... wasn't added to the Linux kernel until 2.6.26." The kernel version in Ubuntu Hardy Heron is 2.6.24. However this application worked under Ubuntu Gutsy Gibbon so my question remains why the program only ceased to work when I upgraded the OS.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: NTFS mount problem

Post by vitamin »

jcobban3 wrote:The output is:

jcobban@jcobban-desktop:~$ wine "/home/jcobban/.wine/drive_c/Program Files/FTW/Ftw.exe"
fixme:storage:StorageImpl_Commit (0x18cea8 1): stub
err:virtual:map_file_into_view shared writable mmap not supported, broken filesystem?
err:virtual:NtMapViewOfSection map_file_into_view 0x63d0000 20000 000000000 failed
fixme:storage:StorageImpl_Commit (0x18cea8 1): stub
fixme:storage:StorageImpl_Commit (0x18cea8 3): stub

In an earlier posting dimesio mentioned that "shared writable mmap, support ... wasn't added to the Linux kernel until 2.6.26." The kernel version in Ubuntu Hardy Heron is 2.6.24. However this application worked under Ubuntu Gutsy Gibbon so my question remains why the program only ceased to work when I upgraded the OS.
Don't use NTFS that's all. It won't work for this particular application because of this exact problem - the missing functionality from FS driver and/or kernel.
jcobban3
Level 2
Level 2
Posts: 10
Joined: Sat Sep 20, 2008 1:55 pm

Re: NTFS mount problem

Post by jcobban3 »

vitamin wrote:
Don't use NTFS that's all. It won't work for this particular application because of this exact problem - the missing functionality from FS driver and/or kernel.
This is admittedly only an inconvenience. Having to copy the file over from its native NTFS to an EXT3 partition just to be able to open it and then to have to copy it back to the NTFS partition once it is updated is work that I would prefer to avoid. I would have thought that support of files on an NTFS partition would be high on the list of desirable features for a Windows emulator package. Therefore I would appreciate a more elaborate explanation.
Tlarhices
Level 4
Level 4
Posts: 101
Joined: Sun Mar 02, 2008 9:28 pm

Re: NTFS mount problem

Post by Tlarhices »

jcobban3 wrote: This is admittedly only an inconvenience. Having to copy the file over from its native NTFS to an EXT3 partition just to be able to open it and then to have to copy it back to the NTFS partition once it is updated is work that I would prefer to avoid. I would have thought that support of files on an NTFS partition would be high on the list of desirable features for a Windows emulator package. Therefore I would appreciate a more elaborate explanation.
Wine is using the file system driver from your distribution to make it's job. If this driver has a bug or is incomplete wine can't do what you (or your software) are asking it to do.
The fact that you are not able to use your software to access an NTFS partition is due to the fact that your distribution NTFS driver is lacking some functionality.
This has nothing to do with wine, but is a problem in the driver/kernel layer and has been addressed in recent kernel versions.
So wait for a kernel update a compile your own but the wine team can't do anything about it.

If you want to save you to copy files around, create a FAT32 partition, it will be working fine for both OS.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: NTFS mount problem

Post by dimesio »

Tlarhices wrote: If you want to save you to copy files around, create a FAT32 partition, it will be working fine for both OS.
Another option would be to install a utility in Windows that will enable it to read/write ext2/3 partitions. There are several out there; two that I know of are: http://www.fs-driver.org/ and http://sourceforge.net/projects/ext2fsd .
Locked