Ftp run modded FTP conf on boot

From QNAPedia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

<multilang>

@de|Dies ist eine Anleitung um die zuvor geänderten Einträge in der proftp.conf immer beim Systemstart zu laden um somit die Änderung aktiv zu haben.


Vorraussetzungen

  • Sie müssen bereits alle Änderungen in der proftpd.conf Datei vorgenommen haben.
  • Sie müssen wissen wie man sich via ssh oder telnet (z.B. mit SSH PuTTY) auf das NAS verbindet
  • Sie müssen wissen wie man Dateien mit dem Editor #vi bearbeitet oder wie man via SFTP (z.B. mit WinSCP) Dateien bearbeitet

Anleitung

Schritt 1

  • Verbinden Sie sich mit SSH oder Telnet auf Ihren Qnap Gerätz.B. mit Putty

Schritt 2

  • Mit dieser Zeile kopieren Sie die bearbeitete proftpd.conf Datei in das Verzeichniss, von wo sie beim Systemstart geladen wird.
cp /mnt/HDA_ROOT/.config/proftpd.conf /share/HDA_DATA/Public/

Schritt 3

  • Binden Sie die config Datei ein ramblock /dev/mtdblock5:
mount -t ext2 /dev/mtdblock5 /tmp/config

Schritt 4

  • Bearbeiten Sie die autorun.sh mit vi: (falls nicht vorhanden, anlegen)
vi /tmp/config/autorun.sh

Schritt 4.1

  • Um in den Bearbeitungsmodus zu wechseln drücken Sie die Taste: a

Schritt 4.2
Fügen Sie nun diesen Text am Ende ein

#Beschreibung
cp /share/HDA_DATA/Public/proftpd.conf /mnt/HDA_ROOT/.config/
/etc/init.d/ftp.sh reconfig

Schritt 4.3

  • Verlassen Sie den Bearbeitungsmodus mit: ESC

Schritt 4.4

  • Anschliessend speichern und verlassen Sie mit: ZZ

Schritt 4.5

  • Stellen Sie sicher das /tmp/config/autorun.sh ausführbar ist:
    # chmod +x /tmp/config/autorun.sh

Schritt 5

  • Wichtig: Trennen Sie die verbundene Partition mit dem Befehl:
umount /tmp/config

Schritt 6

  • Nun das Nas neustarten und nachsehen ob alles funktioniert!
reboot


Hinweis

Bei nachträglichen Änderungen über das Web-Adminmenü gehen die aktuellen Einstellungen verloren bzw. werden beim nächsten Neustart des Gerätes wieder ungültig.


Deutsches Qnap Forum www.qnapclub.de.

@en|

This is a guide to make custom entries in proftp.conf persist on your QNAP NAS.

Requirements

  • You must have already completed all the changes in the proftpd.conf file.
  • You need to know how to get via ssh or telnet (eg with PuTTY SSH connects) to the NAS
  • You need to know how to file with the editor # vi edit or how to via SFTP (eg with WinSCP ) edited files

Instructions

Step 1

Connect to your QNAP with SSH or Telnet, probably using Putty.

Step 2

Use the following command line to copy the existing proftpd.conf for easy editing off of the NAS

  1. cp /mnt/HDA_ROOT/.config/proftpd.conf /share/HDA_DATA/Public/

Step 3

Bind the config file ramblock / dev/mtdblock5:

  1. mount-t ext2 /dev/mtdblock5/tmp/config

Step 4

Edit the autorun.sh with vi: (if not exist, create it)

  1. vi /tmp/config/autorun.sh

Step 4.1

To switch to edit mode, press the key: a

Step 4.2

Now add the following code at the end of a the line starting with '# Description'

  1. cp /share/HDA_DATA/Public/proftpd.conf /mnt/HDA_ROOT/.config/
  2. /etc/init.d/reconfig ftp.sh

Step 4.3

Exit the edit mode: ESC

Step 4.4

Then save and quit with you: ZZ

Step 4.5

Make sure the /tmp/config/autorun.sh executable is:

  1. chmod + x /tmp/config/autorun.sh

Step 5

Important: Disconnect the partition with the command:

  1. umount /tmp/config

Step 6

Now the Nas reboot and see if everything works!

  1. reboot

Note

In case of subsequent changes through the web admin menu, the modified settings will be lost as soon as the service or device is restarted.

German QNAP forum www.qnapclub.de. </multilang>