You are not logged in.

#1 2015-01-07 20:13:03

stefanhartman
Member
Registered: 2013-05-26
Posts: 14

ntfs.mount segfault upon write through Windows 7>Samba

Good day,

I recently installed Samba on a server I intend to use at work for filesharing and other tasks to Windows 7 clients. The bulk of the data will be stored on NTFS (shame, really) so that the drive can be transferred easily if required.
I am using:
samba 4.1.14-2
ntfs-3g 2014.2.15-1
fuse 2.9.3-2

The Samba server works brilliantly, albeit a bit awkward to set nice access permissions for ntfs without using Unix permissions). First, I mount the NTFS drive:

 sudo mount /dev/sdb1 /media/data

I also create a /media/new directory and chown it to 'user1' (this is on / partition, which is ext4)
At this point the drive is mounted, owned by root but all (777) permissive. I can 'cd' into it, create directories and cp files to it from elsewhere.
To test, I create 2 shares:

[one]
   comment = one
   path = /media/data/rd
   valid users = user1
   public = no
   writable = yes
   printable = no


[two]
   comment = two
   path = /media/new
   valid users = user1
   public = no
   writable = yes
   printable = no

I then connect to the server in Windows 7 by 'net use'ing both shares. No problem so far.
I enter the [two] share, paste a load of files to it. Still no problems.
I enter the [one] share, try to paste. Windows immediately complains lack of disk space. Anything you try on the ntfs share after that gives 'Access Denied'.

Samba log files shows many "Transport endpoint is not connected". Trying to cd to the drive gives the same.
I check journalctl and the problem is at:

Jan 07 17:35:05 hostname kernel: mount.ntfs-3g[243]: segfault at fffffffff04040e0 ip fffffffff04040e0 sp 00007fff8cb64d08 error 15
Jan 07 17:35:05 hostname systemd-coredump[493]: Process 243 (mount.ntfs-3g) of user 0 dumped core.
Jan 07 17:35:37 hostname smbd[490]: [2015/01/07 17:35:37.880218,  0] ../source3/smbd/service.c:197(set_current_service)
Jan 07 17:35:37 hostname smbd[490]: chdir (/media/data/rd) failed, reason: Transport endpoint is not connected

So for whatever reason ntfs-3g crashed causing the drive to become inaccessible.
As mentioned, using the drive on the linux system is absolutely fine. It only happen with samba.
I don't know how to proceed any further. I can see some reports of system crashes here:
http://tuxera.com/forum/viewtopic.php?f=5&t=16004
but these are long ago on FreeBSD and the problems were solved by updates as far as I can tell. For those, fuse seems to be the culprit.

I uninstalled ntfs-3g and fuse and instead installed https://aur.archlinux.org/packages/ntfs-3g-fuse/, hoping that the integration of fuse might help. The version number is the same as the ntfs-3g I used originally.
I repeat all steps exactly; it works! I am able to dump a folder full of files on the drive through Samba.

I would really like to use ntfs-3g from Arch Repos since this is a server that I want to keep up to date easily.

Any advice?

Offline

#2 2015-01-07 20:29:48

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,416

Re: ntfs.mount segfault upon write through Windows 7>Samba

/media/data and /media/new are two different partitions/file systems.  Did you run out of space on /?
There maybe something wrong with /media/data/rd (permissions or space).
Transport end not connected, means you don't have a connection.
What user are you using on the net use end?
There's also a free net-drivish alternative program that allows you to mount your unix shares via ssh assigned to a driver letter.  Then you don't have to deal with unix on one side and samba on the other.

Last edited by nomorewindows (2015-01-07 20:50:46)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2015-01-07 21:50:29

stefanhartman
Member
Registered: 2013-05-26
Posts: 14

Re: ntfs.mount segfault upon write through Windows 7>Samba

nomorewindows wrote:

/media/data and /media/new are two different partitions/file systems.

Correct. That is deliberate. I actually created the /media/new share to test function without ntfs3g.

Did you run out of space on /?

No, I have about 30G on / and 1.8TB on NTFS drive.

There maybe something wrong with /media/data/rd (permissions or space).

Checked that thoroughly using different mount permissions, unix permissions, samba permissions. Besides, it works with the ntfs-3g package from AUR.

Transport end not connected, means you don't have a connection.

To the drive? I get this error on the machine to which it is originally mounted

What user are you using on the net use end?

user1, using credentials matching the samba user database. Same user exists as unix account as well.

There's also a free net-drivish alternative program that allows you to mount your unix shares via ssh assigned to a driver letter.  Then you don't have to deal with unix on one side and samba on the other.

Sounds interesting. Searching net-drivish on Google gets me nowhere. Is "Dirvish" related? It seems like the Windows client will need extra software installed. I can't have that. Any more info will be appreciated.

Offline

#4 2015-01-07 23:29:34

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,416

Re: ntfs.mount segfault upon write through Windows 7>Samba

stefanhartman wrote:
nomorewindows wrote:

Transport end not connected, means you don't have a connection.

To the drive? I get this error on the machine to which it is originally mounted

Something is probably disconnected on the original machine, that can happen for odd reasons, may need to fsck.  It is usually a network disconnect. If you have ??? in the directory listing it needs something.  NTFS will still mount even without fuse, but for any and all users, you use fuse, so you should just need what is in the ntfs-3g and fuse in the repos. 

stenfanhartman wrote:
nomorewindows wrote:

There's also a free net-drivish alternative program that allows you to mount your unix shares via ssh assigned to a driver letter.  Then you don't have to deal with unix on one side and samba on the other.

Sounds interesting. Searching net-drivish on Google gets me nowhere. Is "Dirvish" related? It seems like the Windows client will need extra software installed. I can't have that. Any more info will be appreciated.

Don't know your setup, but for in-home use (just a couple of cranky Windows machines that are still going), it's free to use the DirectNetDrive from directnet-drive.net.  I think this is the one that has the light client or am I thinking of something else?

Last edited by nomorewindows (2015-01-07 23:31:25)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB