Slackpkg FTP login
I have 3 machines running slack 64 current, and I have a portable drive on which I keep an up-to-date mirror for updating my machines.
My new router (TP-Link WD-9980) has facilities for NAS, and it seemed to me that a better solution would be to put my mirror on NAS, so that I could update whatever machine I happened to be on, without carrying a portable device around - and forgetting to put it back when finished! Unfortunately, the ftp server for the NAS doesn't appear to allow anonymous logins. The smb server does, but slackpkg doesn't appear to support smb. And I can't find where slackpkg stores its ftp login information. It doesn't appear to be in either the .conf or mirrors files. Does anyone know how to make slackpkg login non-anonymously? Or am I on a loser here? TIA, -- Pete |
In Gentoo I put portage on NFS and mount the share from every box. Why keep a local copy of everything, right? You should be able to do it in Slackware, too. Does your NAS have NFS?
|
Yes, that's what I'm trying to achieve. Sadly, the NAS only supports ftp and smb. Slackpkg supports ftp, but not smb, so it looks like I'm stuck with ftp.
It *ought* to work, as it will log anonymously into ftp servers on the net, but the NAS doesn't appear to support logins without a password - fairly sensible, I suspect! But I can't find where to set a password for ftp in slackpkg! Thanks for your assistance! -- Pete |
For normal users you can set FTP password in ~/.netrc, what user runs slackpkg?
|
Slackpkg has to be run as root (its updating system files). I'm sure it must have ftp login configured somewhere, but I can't find it!
I don't have .netrc in my user account. Normally, for ftp transfers I use gftp. My network connections are managed by NetworkManager. Thanks for the suggestion! Keep 'em coming! :study: -- Pete |
You can create ~/.netrc and its contents will be read by FTP client.
|
Can you just use the normal ftp login:password option in your /etc/slackpkg/mirrors?
Code:
ftp://username:password@192.168.1.1/slackware/slackware64-current/ |
D'oh! Of course!
Why do I always look for a complex answer when there's a simple one staring me in the face? Many thanks! That worked perfectly! Now all I have to do is work out how to sync the NAS with the mirror. rsync cant handle two network connections at once it appears. Can lftp do this? or ftpsync? Any suggestions? Cheers, -- Pete |
Quote:
Quote:
|
I use rsync to update the portable drive, and that works well. Unfortunately, rsync doesn't seem support a non-local destination directory. I've had a go using lftp, which I *almost* got to work - I'm struggling a bit with the syntax. However, the NAS supports smb as well as ftp, so it looks as if I might be able to mount the NAS via smb, so that it looks like a local directory, and then use rsync as at present.
I'm going to have a go at that later today - got some chores to do first! -- Pete |
You could use curlftpfs to mount an FTP directory locally. It'd make rsync much easier.
Code:
curlftpfs 192.168.1.1 /mnt/NAS/ -o user=username:password,allow_other Code:
curlftpfs#user:password@192.168.1.1 /mnt/NAS fuse defaults,allow_other,_netdev 0 0 |
Yes, that looks like a good possibility too! Indeed, reading the info, it seems to have advantages over smb. It will be tomorrow before I get chance to compile it though - I seem to be running out of free time today!
Many thanks for the pointers! -- Pete |
Quote:
:hattip: |
Thanks to all for your help and advice! I've sort of managed to achieve what I want with both cifs and curlftpfs, but have run into issues with both - though not related to my original question! Unfortunately the "cheap and cheerful" NAS system that is part of my router only supports FAT and NTFS file systems as well, which gives me a headache when trying to copy the Slackware mirror to them (symlinks, etc).
Since this is wandering off the original topic, I'm going to start a new thread seeking advice on this issue. I'm sure what I'm attempting must be possible, and may be of interest to others fighting the built-in limitations of such a system. Again, thanks to all those who have contributed responses to this thread. -- Pete |
All times are GMT -5. The time now is 02:12 AM. |