How-To Zmiana config'a ProFTPD (proftpd.conf)

Silas Mariusz

Silas Mariusz

SysOp
Administrator
Apr 5, 2008
9,635
23
1,985
153
38
www.devspark.pl
QNAP
TS-x77
Ethernet
1 GbE
A wiec, ostatnio otrzymalem dosc ciekawe maila w ktorym to pewien z uzytkownikow QNAP NAS chcial zmienic standardowy plik konfiguracyjny ProFTPD. Jednak nie udawalo mu sie, poniewaz za kazdym razem, kiedy restartowal usluge FTPD, config przywracal sie do oryginalnego z stoczni QNAP.

Czy jest na to rozwiazanie? Przed napisaniem co trzeba zrobic, chcialbym polecic wszystkim uzytkownikom kilka ciekawych informacji...

1) Oryginalny config proftpd ( /mnt/HDA_ROOT/.config/proftpd.conf )
Code:
ServerName		"ProFTPD"
ServerType		standalone
DefaultServer		on
RootLogin		on
Port			21
MaxInstances		30
User			guest
Group			guest
DefaultRoot		/share
Umask			000
ShowSymlinks		off
AllowOverwrite		on
TimesGMT			off
UseReverseDNS		off
WtmpLog			off
AllowStoreRestart	on
TransferLog		NONE
UseReverseDNS            off
IdentLookups             off
DisplayLogin 		welcome.msg
CharsetLocal			UTF-8
CharsetRemote			ISO8859-2
UseUTF8          off
TLSEngine              off
TLSRequired            off
TLSRSACertificateFile	/etc/ssl/certs/myhost.crt
TLSRSACertificateKeyFile /etc/ssl/private/myhost.key
TLSCACertificateFile   /etc/ssl/certs/myrootca.crt
TLSOptions		NoCertRequest
TLSVerifyClient	off
PassivePorts 55536 56559
MaxClientsPerUser 	10
EnableUserWanIp          off
<Directory "/share/HDY_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDB_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDF_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDH_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDO_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDK_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDT_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDS_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDG_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDP_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDN_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDR_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDW_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDM_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDX_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/external">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDZ_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDV_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDD_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDC_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDL_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDQ_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDU_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDI_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDE_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDJ_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/HDA_DATA">
	<Limit ALL>
		DenyAll
	</Limit>
</Directory>

<Directory "/share/Qmultimedia">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

<Directory "/share/Qdownload">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

<Directory "/share/Qrecordings">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

<Directory "/share/Qweb">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

<Directory "/share/Qusb">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

<Directory "/share/Public">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowUser	"admin"
		AllowGroup	"everyone"
		AllowUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
		AllowGroup	"everyone"
		AllowUser	"guest"
	</Limit>
</Directory>

<Directory "/share/Network Recycle Bin 1">
	<Limit READ DIRS>
		Order		Deny, Allow
		AllowGroup	"everyone"
		AllowUser	"admin"
		DenyUser	"guest"
	</Limit>
	<Limit ALL>
		Order		Deny, Allow
		AllowUser	"admin"
	</Limit>
</Directory>

2. Przydatne linki:
http://pl.docs.pld-linux.org/uslugi_proftpd.html
http://newbie.linux.pl/wydruk.php?wydru ... ow=artykul



A teraz ...
Aby zmiany zostaly zachowane nalezy wykonac ponizsze polecenie:
Code:
# /etc/init.d/ftp.sh reconfig
w przeciwnym razie, po restarcie urzadzenia zostanie przywrocony stary conf
 
P

polityk

Passing Basics
Beginner
Sep 11, 2008
13
1
1
You must log in or register to view this reply.
 
Silas Mariusz

Silas Mariusz

SysOp
Administrator
Apr 5, 2008
9,635
23
1,985
153
38
www.devspark.pl
QNAP
TS-x77
Ethernet
1 GbE
You must log in or register to view this reply.
 
T

tech01

Nowy użytkownik
Noobie
Jan 23, 2013
1
0
1
You must log in or register to view this reply.