Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
curlftpfs seems to ignore ~/.netrc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ronino
n00b
n00b


Joined: 29 Mar 2005
Posts: 18

PostPosted: Mon Nov 21, 2011 5:06 pm    Post subject: curlftpfs seems to ignore ~/.netrc Reply with quote

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

Code:
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
Code:
$ mount /backup
works fine as root, but as normal user, I get this:

Code:
$ mount /backup
Error connecting to ftp: Access denied: 530


The interesting thing is that mounting the share as a normal user works like this:
Code:
$ 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?
Back to top
View user's profile Send private message
ronino
n00b
n00b


Joined: 29 Mar 2005
Posts: 18

PostPosted: Tue Nov 22, 2011 5:45 am    Post subject: Re: curlftpfs seems to ignore ~/.netrc Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum