Transfer files between a Sweex/Edimax router and a remote PC
This
page records how to set up Samba and FTP services (also
see my note on wget)
Samba lets PCs and Macs on your LAN open windows containing
the contents of the folders in the memory stick - you can then use a PC/Mac
text processor or html editor to modify the files directly on a live Sweex/Edimax
router.
FTP lets you transfer complete files back and forth across the wider internet. I like Fireftp (within the Firefox browser) since it is the same on any platform.
Samba is easier to use but took some time to set up as I wanted. A powerful "context coloured" text editor (like BBedit on the Mac) makes developing Blassic and ash control programs (etc) very easy.
1)
Make sure the Sweex has a fixed LAN address and can connect to the internet - set the following in the files on the USB memory stick |
etc/midge.conf
is set so that the 5 ethernet ports are all at one local LAN address (I
use 192.168.0.3) the line VLAN_MX="0x5F,0,0,0,0,0" # 1 ethernet iface (5LAN) should NOT have a # at the start |
etc/network/interfaces
should contains this - auto eth0 iface eth0 inet static address 192.168.0.3 <- change this netmask 255.255.255.0 gateway 192.168.0.230 <- change this to your ADSL gateway LAN address (remove the rest) |
etc/resolv.conf |
Thanks to Picprojects
for help in setting up Samba- you may prefer to use his Tutorial
Picprojects notes that Nano is a very simple text editor for use via a Telnet
session
- I agree - no need to read a help file, just use it!
2) ipkg - lets you add programs to the memory stick - no need to recompile the Sweex firmware |
First update /etc/ipkg.conf so that the following source lines are active src
picprojects http://www.picinternetprojects.247n.com/packages |
3) nano - a very easy to use text editor that lets you modify a live router within a Telnet session. |
In a terminal window type - telnet
192.168.0.3 -
use user root
and password midge |
4) samba | ||
In a terminal window type - telnet
192.168.0.3 -
use user root
and password midge
Test it BUT also see note 6 below |
5) ftp |
Many
thanks to gpolder for help (see the thread "FTP" on the discussion
board on this site) telnet
192.168.0.3 -
use user root
and password midge |
6) Some notes on users and permissions - and some Samba problems | ||
Adding a new user to the router for ftp and samba http://midge.vlad.org.ua/forum/viewtopic.php?t=403&highlight=adduser procedure graham:x:1001:1000:graham:/home/graham:/bin/ash I gave graham's directory and the /home directory permission 777 Give graham a password midge# passwd graham in etc/passwd I now see something a bit like - I opened a new ftp session using the Fetch ftp client on my Mac But as graham I have full read access to ALL folders Samba In a Telnet session I typed In /etc/hosts I added the line '192.168.0.4 midge04' In /etc/samba/smb.conf I altered the last line graham can then see the contents of but not write to any folders that are set to 777 security You also have to give root a Samba password - the Telnet session was - Even so, with the default contents of /etc/samba/smb.conf root can only save files to folders that are set to 777 TIP If you have two Sweex/Edimax routers on the network change their names in /etc/hostname The following lets root see and write to any folder in the USB memory stick and lets graham see it all but only write to 777 folders.
|
Please
email me
with errors and improvements
- these are my personal notes of what I have recently learned from the experts
to whom many thanks
- here for my future reference and for any help they may give others