Portál AbcLinuxu, 23. dubna 2024 17:05


Dotaz: ProFTPd - vlastni adresar

12.11.2009 12:52 xyzop
ProFTPd - vlastni adresar
Přečteno: 172×
Odpovědět | Admin
Dobry den, procital jsem manual, hledal na internetu, ale nikde se mi nepodarilo najit jak nastavit aby mel alias user2 po prihlaseni pristup jen do daneho adresare na /home/FTP-shared/directory2

Momentalen se tam prihlasuje jenom user1 a ma pristup do celeho /home/FTP-shared/ ale ja potrebuju aby user2 byl pro prihlaseni primo v /home/FTP-shared/directory2

dole uvadim moji konfiguraci. Dekuji za kazdou pomoc.

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

AllowOverwrite on
AuthAliasOnly on
UserAlias user1 userftp
UserAlias user2 userftp



ServerName                      "ftp.example.com"
ServerType                      standalone
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           002

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                    30

# Set the user and group that the server normally runs at.
User                            userftp
#Group                          nogroup

# Normally, we want files to be overwriteable.
< Directory /home/FTP-shared/*>
  AllowOverwrite                on
< /Directory>


# only for the web servers content
DefaultRoot /home/FTP-shared

# nobody gets the password "lampp"
# UserPassword nobody examaplepassword

# nobody is no normal user so we have to allow users with no real shell
RequireValidShell off

# nobody may be in /etc/ftpusers so we also have to ignore this file
UseFtpUsers off

Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

13.11.2009 01:37 camel1cz | skóre: 25
Rozbalit Rozbalit vše Re: ProFTPd - vlastni adresar
Odpovědět | | Sbalit | Link | Blokovat | Admin
Zdravím,

obávám se, že přesně tak, jak to požadujete to nepůjde.

Jak to řeším já:

1) v proftpd.conf mám DefaultRoot ~
2) virtuální uživatele mám ve zvláštním passwd souboru (viz. AuthUserFile) - všechny mapované na jeden systémový účet
3) v tomto passwd souboru mám u každého virtuálního usera jiný home (jeho jail)

Snad to pomůže...

C.

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.