Using FTP it is possible to up- and download files to and from your Fritz!Box. This is done by the program bftpd. As one can see looking at the code, two files are downloaded bftpd is the binary. bftpd.cfg is the configuration file of the binary (program) that can be modified if required.
Binary- (old binary): directories and file sizes are displayed correctly. The user administration with “FILE_AUTH” is also still possible.
Fritz!Box without USB memory
1. Here you create the hash code for your password. This is replacing “mypassword”. Additionally it is recommended to replace “myname” by a name of your choice, e.g. your name.
2. Execute the steps below in the console. After that the Fritz!Box can be reached by FTP; as FTP client you can use any client on your computer. To login use the data entered in step 1 (username and password – don’t use the hash code). If the port number must be entered use the standard port 21.
3. If everything works ok, you can add the code into “debug.cfg”
Code for mipsel-Fritz!Boxes (e.g. 7270, 7170 et al.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
DOWNLOADPAGE='http://download.fritzmod.net' # Please select your version (latest selected): # BFTPD=bftpd # old version BFTPD=bftpd_v3.3_mipsel LOGIN='myName' PASSWD='myPassword' TEMP=/var/tmp while !(ping -c 1 www.google.de); do sleep 5; done cd $TEMP wget $DOWNLOADPAGE/bftpd.conf wget -O bftpd $DOWNLOADPAGE/mipsel/$BFTPD chmod +x bftpd chmod 777 bftpd.conf echo $LOGIN:$PASSWD:0:0:root:/:null >> $TEMP/passwd $TEMP/bftpd -d -c $TEMP/bftpd.conf |
Code for mips-Fritz!Boxes (e.g. 7390, 7340 et al.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
DOWNLOADPAGE='http://download.fritzmod.net' # Please select your version (latest selected): # BFTPD=bftpd # old version BFTPD=bftpd_v3.3_mips LOGIN='myName' PASSWD='myPassword' TEMP=/var/tmp while !(ping -c 1 www.google.de); do sleep 5; done cd $TEMP wget $DOWNLOADPAGE/bftpd.conf wget -O bftpd $DOWNLOADPAGE/mips/$BFTPD chmod +x bftpd chmod 777 bftpd.conf echo $LOGIN:$PASSWD:0:0:root:/:null >> $TEMP/passwd $TEMP/bftpd -d -c $TEMP/bftpd.conf |
Fritz!Box with USB memory
1. Download one of the versions bftpd, bftpd.conf and save it as bftpd and bftpd.conf on the USB memory in directory “ftp”:
For mipsel-Fritz!Boxes (e.g. 7270, 7170 et al.)
For mips-Fritz!Boxes (e.g. 7390, 7340 et al.)
Advanced users might want to use another directory. Don’t forget to adapt the code!
2. Here you create the Hash code. Use that instead of “mypassword”. Additionally it is recommended to replace “myname” by a name of your choice, e.g. your name.
3. Execute the steps below in the console. After that the Fritz!Box can be reached by FTP; as FTP client you can use any client on your computer. To login use the data entered in step 1 (username and password – don’t use the hash code). If the port number must be entered use the standard port 21.
4. If everything works ok you can add the code sequence to “debug.cfg”
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
HDD='Hitachi-HTS543216L9A300-01' # ATTENTION: this must be adapted! HDD_ABSOLUT='/var/media/ftp/'$HDD LOGIN='myName' PASSWD='myPassword' TEMP=/var/tmp while ! [ -d $HDD_ABSOLUT ] ; do sleep 5; done cd $TEMP cp $HDD_ABSOLUT/ftp/bftpd.conf $TEMP cp $HDD_ABSOLUT/ftp/bftpd $TEMP chmod +x bftpd chmod 777 bftpd.conf echo $LOGIN:$PASSWD:0:0:root:/:null >> $TEMP/passwd $TEMP/bftpd -d -c $TEMP/bftpd.conf |
Configure multiple users
1. Think about how many users are needed and what access right they need. In the example I create two users: “user0” and “user1”, both having only limited access rights.
2. Create directories for the new users; they have full access rights to their directory:
1 2 3 4 5 6 7 8 |
HDD='Hitachi-HTS543216L9A300-01' # ATTENTION: must be adapted! HDD_ABSOLUT='/var/media/ftp/'$HDD USER0='user0' # you can select a name of your choice USER1='user1' # you can select a name of your choice mkdir $HDD_ABSOLUT/$USER0 mkdir $HDD_ABSOLUT/$USER1 |
3. /var/tmp/passwd modify accordingly:
1 2 3 4 5 6 7 8 9 10 11 |
HDD='Hitachi-HTS543216L9A300-01' # ATTENTION: must be adapted! HDD_ABSOLUT='/var/media/ftp/'$HDD TEMP=/var/tmp USER0='user0' # any name of your choice USER1='user1' # any name of your choice PASSWD0='user0Password' # Hash code PASSWD1='user1Password' # Hash code echo $USER0:$PASSWD0:0:0:root:$HDD_ABSOLUT/$USER0:null >> $TEMP/passwd echo $USER1:$PASSWD1:0:0:root:$HDD_ABSOLUT/$USER1:null >> $TEMP/passwd |
4. If everything works ok, the code can be added to debug.cfg. compare chap. “debug.cfg”)