# curlftpfs seems to ignore ~/.netrc

## ronino

I have setup my /etc/fstab to make an FTP share available via mount:

```
curlftpfs#backup.example.com /backup fuse rw,user,noauto 0 0
```

I also setup /root/.netrc and /home/user/.netrc with the credentials for the FTP login. Now 

```
$ mount /backup
```

 works fine as root, but as normal user, I get this:

```
$ mount /backup

Error connecting to ftp: Access denied: 530

```

The interesting thing is that mounting the share as a normal user works like this:

```
$ curlftpfs backup.example.com /backup

```

The credentials are correctly read from ~/.netrc which makes me conclude that somehow that ~/.netrc is ignored when using "mount" as opposed to curlftpfs directly.

What could be the reason?

----------

## ronino

 *ronino wrote:*   

> The credentials are correctly read from ~/.netrc which makes me conclude that somehow that ~/.netrc is ignored when using "mount" as opposed to curlftpfs directly.

 

I found out that using "mount" as normal user tries to read /root/.netrc instead of ~/.netrc. As /root/.netrc is not accessible for anyone but root, curlftpfs cannot read it and thus the FTP connection fails. A quick fix would be to make /root/.netrc readable for my user, but this is not really what I want.

http://curlftpfs.sourceforge.net/ states:

 *Quote:*   

> You can put the user and password in a .netrc file in the home directory of the user that executes CurlFtpFS.

 

As /bin/mount has the SUID bit set, I thought removing the bit could fix the problem, but obviously it doesn't.

Is there a way to make mount use my instead of root's home directory?

----------

