ich habe die aktuelle proftpd Version (1.3.3a) compiled und wollte auf unserem Webserver ein per Samba freigegebenes Verzeichnis auch per FTP erreichbar machen, weil das Samba Protokoll einfach zu langsam über die VPN Verbindung arbeitet.
Dabei ist es so, dass das /var/www Verzeichnis die Rechte 0770 besitzt und als chown {user}:www-data eingetragen ist. Samba ist auch per Force Group zu www-data konfiguriert. Klappt soweit alles wunder bar.
Alle neuen Dateien besitzen 0660 und alle neuen Verzeichnisse 0770 Rechte und die Gruppe ist immer www-data.
Leider klappt die Umsetzung in proftpd noch nicht wirklich. Wenn ich mich einlogge und ein Verzeichnis oder Datei erstelle, hat dieses immer als Owner und Group den eingeloggten Benutzer.
Also wenn ich mich als "test" anmelde ist chown bei Verzeichnissen und Dateien immer test:test (user:group). Die Konfiguration per UserOwner und GroupOwner scheint völlig ignoriert zu werden. Ich führe die Auth über ein AuthUserFile und AuthUserGroup durch. In der Doku habe ich auch gesehen das es bei SQL einen Parameter SQLMinID gibt, der standardmäßig auf 999 steht. Daher dachte ich proftpd greift erst ab uid 999. Aber selbst wenn ich einen Benuter mit uid 1001 (test) und uid 10000 (test2) habe und
GroupOwner test
setze, mich mit test2 einlogge, bleibt es beim anlegen immer bei test2:test2. Momentan habe ich auch keine Ideen weiter wo das Prolem liegt ...
Code: Alles auswählen
# This sample configuration file illustrates creating two
# virtual servers, and associated anonymous logins.
ServerName "ProFTPD"
#ServerType inetd
ServerType standalone
# Port 21 is the standard FTP port.
Port 21
UseReverseDNS off
# Global creates a "global" configuration that is shared by the
# main server and all virtualhosts.
<Global>
AuthOrder mod_auth_unix.c mod_auth_file.c
RequireValidShell off
ServerLog /usr/local/etc/proftpd.log
ExtendedLog /usr/local/etc/proftpdall.log ALL
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 007 007
AuthUserFile /usr/local/etc/ftpd.passwd
AuthGroupFile /usr/local/etc/ftpd.group
SQLBackend mysql
SQLAuthenticate off
SQLMinID 33
</Global>
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# 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
# Maximum seconds a data connection may "stall"
TimeoutStalled 300
# First virtual server
<VirtualHost 192.168.1.10>
ServerName "Virtual.com's FTP Server"
DefaultChdir /var/www
MaxClients 10
MaxLoginAttempts 3
# DeferWelcome prevents proftpd from displaying the servername
# until a client has authenticated.
DeferWelcome on
User www-data
Group www-data
<Directory /var/www>
GroupOwner test1
</Directory>
</VirtualHost>