# NTFS-3G update broke NFS-Export

## vootey

I have following problem after upgrading sys-fs/ntfs3g from 2009.3.8 to 2010.3.6:

I mount my ntfs-device and export the target-mount-directory via nfs. After upgrading ntfs3g on the nfs-server, the nfs-mount on the clients isn't writeable any more (means, if a file is created, this file is in fact created on the ntfs-partition, but always has 0 bytes content). On the nfs-server itself, I can write on the ntfs-drive as I want.

```
# cat /etc/fstab | grep ntfs

/dev/sdb1      /home/wtorrent/    ntfs-3g      defaults,rw,users   0 0
```

```
# cat /etc/exports | grep wtorrent

/home/wtorrent 192.168.0.0/255.255.255.0(async,no_subtree_check,rw,root_squash)
```

Does anyone know, what the matter is here?

----------

## vootey

hm.. weird. Something must be wrong here:

after running

```
chown -R wtorrent:users /home/wtorrent/
```

(so on the mounted ntfs-drive)

all files and directories in there are set to root:root .

wtf?

----------

## dE_logics

In fstab you can set an option for ntfs/vfat as uid=<your user name, NOT ID necissarily>,gid=<similar to UID>,umask=<whatever you want...>

Try setting these. Set umask as 000

----------

## vootey

I tried these settings.

I copied a file into the mounted nfs-directory (in my case with dolphin). Now the copying (+ editing, removing) itself works, but a error-msg popups, that the permissions couldn't be set. That alone, would not be a problem of course. The problem is, if I download a file with firefox and tell him to save the file in this directory, firefox aborts somehow and a file with 0 byte content is left.

Can this be by-passed? It is very important for my work-flow to get firefox be able to do so.

----------

## dE_logics

Any output from firefox?

dmesg output?

----------

## vootey

firefox' output

```
*** exception in validateLeafName: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.create]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: file:///usr/lib/xulrunner-1.9.2/components/nsHelperAppDlg.js :: anonymous :: line 328"  data: no]
```

no extra dmesg output

----------

## dE_logics

Use flags of ntfs3g?

What happens to dmesg when you try and mount the fs? By fs I mean the ntfs partition and nfs also in the corresponding systems.

----------

## vootey

ntfs3g - Installed versions:  2010.3.6(09:01:15 PM 09/09/2010)(acl external-fuse suid udev -debug -hal)

* log from nfs-server (where the ntfs-dev is mounted)

mounting the ntfs device:

/var/log/messages

```
Sep 18 09:36:54 netoo ntfs-3g[24904]: Version 2010.3.6 external FUSE 28

Sep 18 09:36:54 netoo ntfs-3g[24904]: Mounted /dev/sdb1 (Read-Write, label "Seagator", NTFS 3.1)

Sep 18 09:36:54 netoo ntfs-3g[24904]: Cmdline options: rw,noexec,nosuid,nodev,users,uid=1001,gid=100,umask=000

Sep 18 09:36:54 netoo ntfs-3g[24904]: Mount options: rw,noexec,nosuid,nodev,users,silent,allow_other,nonempty,relatime,fsname=/dev/sdb1,blkdev,blksize=4096,default_permissions

Sep 18 09:36:54 netoo ntfs-3g[24904]: Global ownership and permissions enforced, configuration type 7
```

nothing in dmesg.

mounting nfs:

/var/log/messages

```
Sep 18 09:38:24 netoo mountd[24925]: authenticated mount request from 192.168.0.7:862 for /home/wtorrent/watch (/home/wtorrent)
```

dmesg

```
[1101434.891754] svc: failed to register lockdv1 RPC service (errno 97).
```

* On the client side, there are no added entires in /var/log/messages as well as in dmesg.

----------

## dE_logics

Do you have a sunrpc module build or is it build into the kernel?

Just random guess... try without compiling ntfs 3g with suid, also try and mount everything with exec option.

When the NFS service has started see if rpc.idmapd, rpc.pipefs and rpc.statd services have also started.

----------

## vootey

 *dE_logics wrote:*   

> Do you have a sunrpc module build or is it build into the kernel?

 

```
CONFIG_SUNRPC=y

CONFIG_SUNRPC_GSS=y
```

 *dE_logics wrote:*   

> Just random guess... try without compiling ntfs 3g with suid, also try and mount everything with exec option.

 

Didn't work. Changes nothing. :S

 *dE_logics wrote:*   

> When the NFS service has started see if rpc.idmapd, rpc.pipefs and rpc.statd services have also started.

 

```
  408 ?        00:00:00 rpciod/0

  409 ?        00:00:00 rpciod/1

 2707 ?        00:00:00 rpc.statd

 8073 ?        00:00:00 rpc.mountd
```

hm.. there is no imapd or pipefs. Could this cause the problem?

----------

## vootey

Sorry, the sunrpc-module is built-in. I used the false .config looking for. I edited it in the previous post.

----------

## dE_logics

Try - 

```
/etc/init.d/rpc.idmapd start; /etc/init.d/rpc.pipefs start
```

----------

## vootey

I did that:

```
$ ps -e | grep rpc

 2687 ?        00:00:00 rpc.statd

 2699 ?        00:00:00 rpciod/0

 2700 ?        00:00:00 rpciod/1

 2716 ?        00:00:00 rpc.mountd

19599 ?        00:00:00 rpc.idmapd
```

but sadly it also didn't change the situation.

----------

## dE_logics

First lets diagnose if the problem is with NTFS itself.

So try some FS.

Also try upgrading or downgrading NFS.

----------

## krinn

it's an nfs problem.

check in your emerge.log you will see you've update ntfs3g and nfs-utils was also updated.

nfs-utils now default all nfs server to be version 4

your server export is bad for a version 4

also (for me) there's a bug with user access without kerberos.

change your mount method to force a version 3 and this should correct your issue. like that

server/path        /destpath        nfs      rw,nfsvers=3    blahblah

or do "mount -v /despath" to check (hence the -v) if client & server are doing a v4 sharing.

----------

## vootey

 *krinn wrote:*   

> check in your emerge.log you will see you've update ntfs3g and nfs-utils was also updated.

 

On the server:

```
$ genlop ntfs3g | tail -5

Tue May  4 22:50:49 2010 >>> sys-fs/ntfs3g-2009.3.8

Sun Sep  5 14:00:06 2010 >>> sys-fs/ntfs3g-2010.3.6                                                               

Thu Sep  9 21:01:30 2010 >>> sys-fs/ntfs3g-2010.3.6                                                               

Sat Sep 18 09:57:47 2010 >>> sys-fs/ntfs3g-2010.3.6
```

```
$ genlop nfs-utils | tail -4                                                                                

Tue Oct 20 20:00:55 2009 >>> net-fs/nfs-utils-1.2.0

Tue Jan 12 00:28:25 2010 >>> net-fs/nfs-utils-1.1.4-r1                                                            

Sun Apr 25 15:53:45 2010 >>> net-fs/nfs-utils-1.1.4-r1
```

On the client:

```
$ genlop nfs-utils | tail -3

Mon Jun 28 09:20:18 2010 >>> net-fs/nfs-utils-1.2.2-r1

Wed Aug 11 08:49:15 2010 >>> net-fs/nfs-utils-1.2.2-r2
```

So, no, it was not.

 *krinn wrote:*   

> nfs-utils now default all nfs server to be version 4
> 
> your server export is bad for a version 4

 

I had this problem before and fixed it a few month (?) ago.

```
$ cat /etc/fstab | grep nfs

192.168.0.1:/var/lib/mpd/music  /home/void/Music        nfs     defaults,user,noauto,rw,nfsvers=3       0 0

192.168.0.1:/home/wtorrent/downloads    /home/void/Downloads/Server     nfs     defaults,user,noauto,ro,nfsvers=3       0 0

192.168.0.1:/home/wtorrent/watch        /home/void/Downloads/Torrents   nfs     defaults,user,noauto,rw,nfsvers=3       0 0

192.168.0.1:/home/void/Pictures /home/void/Pictures/Server      nfs     defaults,user,noauto,ro,vers=3  0 0

192.168.0.1:/tmp /tmp/netoo     nfs     defaults,user,noauto,ro,vers=3  0 0
```

I had all lines set to 'vers=3'. I did as you recommended: set a few entries to 'nfsvers=3' and mounted them. No change and as per output, it's mounted via nfs v3 then (as before).

----------

## vootey

 *dE_logics wrote:*   

> First lets diagnose if the problem is with NTFS itself.
> 
> So try some FS.

 

NFS-exporting from ext3 completely works as expected.

----------

## krinn

and getting back to previous ntfs3g fix it ?

----------

## dE_logics

 *vootey wrote:*   

>  *dE_logics wrote:*   First lets diagnose if the problem is with NTFS itself.
> 
> So try some FS. 
> 
> NFS-exporting from ext3 completely works as expected.

 

Why not just use ext3?... it could be another MS bug. We have 'drivers' for ext3 in win.

----------

## vootey

 *dE_logics wrote:*   

> Why not just use ext3?... it could be another MS bug. We have 'drivers' for ext3 in win.

 

There is ext3-support in win actually? I didn't know that.

However, the next problem is, this is my largest HDD and I cannot back it up.  :Very Happy:  (at least not, where I'm located atm). Unless there is no way to convert the fs directly I have to wait..  :Razz: 

 *krinn wrote:*   

> and getting back to previous ntfs3g fix it ?

 

This (very old) version of ntfs3g is not in portage any more.

The last thing I'll try is to go to unstable portage tree on the server. Maybe there are bug-fixes or whatever.

I thank you two guys for your help. It's very much appreciated.

----------

## dE_logics

I use those ext3 drives and install games in that drive.

You can also try mounting the ntfs partition by hand instead of automounting using fstab.

To get the old version - 

http://packages.gentoo.org/package/sys-fs/ntfs3g

I think they really remove the old version.

----------

