Saturday, August 21, 2010

Re: netrw autologin

On 21/08/10 09:52, epanda wrote:
>
>
>> Please look at :help netrw-start ; it has directions on how to build
>> a .netrc file which your ftp can read and bypass the need to constantly
>> enter the userid+password. Of course,
>
>>> if you're a Windows user, then
>>> you'll need to check on whether your ftp client supports using that file
>>> and where it reads it from (and perhaps even what oddball format it
>>> uses, as Windows is well known for "doing it differently").
>
>
> I f I understand, on xp, the netrw plugin does not link windows xp net
> cmd with my $home/.netrc.
>
> I have added the .netrc file as described in the help :
>
> machine {ftp://mylogin@ftpmachine.fr} login {mylogin} password
> "{mypass}"
> default login {mylogin} password "{mypass}"
>

If you're on a double-boot system, you must be aware of the fact that
files on a FAT (or, IIUC, NTFS) filesystem are typically seen as with
permissions 0777 i.e. -rwxrwxrwx (or maybe 0555 when the FAT "readonly"
attribute is set) when read by a Unix/Linux kernel. This is not
acceptable to the ftp program for a .netrc file containing at least one
password for a username other than "anonymous": such a netrc must have
read permissions off for everyone other than its owner, or the autologin
will abort.

I don't know if Windows ftp is aware of a $HOME/.netrc file, or under
which name it looks for it in which directory; and since the "man"
command is usually not implemented on Windows, I don't know how to find out.

Oh, and another thing: no scheme prefix to the hostname. Here's a
typical netrc file text:


machine ftp.example.net login epanda password qx3rv85f
machine ftp.example.com login epanda password a4s5vbx8
default login anonymous password callingelvis@hotmail.fr

Best regards,
Tony.
--
"Saw a sign on a restaurant that said Breakfast, any time -- so I
ordered French Toast in the Renaissance.
-- Steven Wright

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: