DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-05-04 12:55:42

Mr_Zoidberg
Member
Registered: 2008-05-01
Posts: 11

ftpaccess restores after a reboot

Hello,

I tried to edit ftpaccess with vi to specify the passive ports. After the edit I could enter the ftp server in passive mode cool

But after a reboot the ftpaccess config file gets restored by the original config file....

Is there a way to edit the config file permanently or is there an other solution?

Thanks a lot smile

Zoidberg

Offline

 

#2 2008-05-04 14:46:54

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 88

Re: ftpaccess restores after a reboot

Mr_Zoidberg wrote:

Hello,

I tried to edit ftpaccess with vi to specify the passive ports. After the edit I could enter the ftp server in passive mode cool

But after a reboot the ftpaccess config file gets restored by the original config file....

Is there a way to edit the config file permanently or is there an other solution?

Thanks a lot smile

Zoidberg

You can create a config file in /mnt/HD_a2 then replace the original one at every boot through fun_plug

You can also modify the firmware but I don't know how can do that.


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#3 2008-05-04 17:17:45

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 119
Website

Re: ftpaccess restores after a reboot

SystemR89 wrote:

You can also modify the firmware but I don't know how can do that.

Easy :

you mount /sys/mtd1
copy the ftpaccess file on /sys/mtd1
umount the /sys/mtd1 and the parameter is in the flash memory

Offline

 

#4 2008-05-04 17:37:49

Mr_Zoidberg
Member
Registered: 2008-05-01
Posts: 11

Re: ftpaccess restores after a reboot

SystemR89 wrote:

Mr_Zoidberg wrote:

Hello,

I tried to edit ftpaccess with vi to specify the passive ports. After the edit I could enter the ftp server in passive mode cool

But after a reboot the ftpaccess config file gets restored by the original config file....

Is there a way to edit the config file permanently or is there an other solution?

Thanks a lot smile

Zoidberg

You can create a config file in /mnt/HD_a2 then replace the original one at every boot through fun_plug

You can also modify the firmware but I don't know how can do that.

Thx! I guess thats's the most safe way smile

Do you also know the command to run the ftp server by using the fun_plug?

Offline

 

#5 2008-05-04 22:02:54

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 88

Re: ftpaccess restores after a reboot

activating the ftp server in web interface with the lastest 'us' (not eu) firmware it should start automatically. For me it works.
Can you share your new config file?
Thanks


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#6 2008-05-04 22:12:54

Mr_Zoidberg
Member
Registered: 2008-05-01
Posts: 11

Re: ftpaccess restores after a reboot

Just remove the # before the passive ports line smile

/mnt/HD_a2/ftpaccess

Code:

#FTPConf=V1.04
#start
#FTProot=/home/ftp
#FTPport=21
#anonymous=yes,read
class   all   real,guest,anonymous  *

limit all  5 Any /etc/ftpmaxnumber

ul-dl-rate 50 all

throughput /mnt * * oo - *

timeout idle 180
timeout maxidle 180
timeout accept 180

passive  ports  0.0.0.0/0    65501   65510
pasv-allow all *

restricted-uid *

noretrieve /home/ftp

readme  README*    login
readme  README*    cwd=*

message /welcome.msg            login
message .message                cwd=*

compress        yes             all
tar             yes             all
chmod           yes             all
delete          yes             all
overwrite       yes             all
rename          yes             all
umask           yes             all

log commands real
log transfers anonymous,real inbound,outbound

/mnt/HD_a2/fun_plug

Code:

#!/bin/sh

if [ ! -e /mnt/HD_a2/ash ]
then
  ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
  echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
  /mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd
cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9
cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9
/mnt/HD_a2/busybox telnetd &

cp /mnt/HD_a2/ftpaccess /etc/ftpaccess

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB