PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : pure-ftpd mit Debian



sallo
11.05.05, 11:42
Hallo,
ich möchte gerne pure-ftpd auf einem Debian-System einsetzten.

Per FTP sollen für jeden Benutzer verschiedene Verzeichnisse erreichbar sein. Unter anderem das Home- sowie ein Public-Verzeichnis.

Nach dem ich mir die Doku durchgelesen habe, meine ich folgendes Feature nutzen zu müssen um im Home-Verzeichnis einen Link auf weitere Verzeichnisse setzen zu können.



--with-virtualchroot: usually, when an user is chrooted (-A and -a
options), it's impossible to go out of his home directory. Enabling that
feature makes it possible: symbolic links are always followed, even if they
are pointing to directories not located in the user's home directory. This
is very useful for having shared directories (for instance, have a symbolic
link to /var/incoming in every home directory) .
This feature isn't enabled by default.


Dieser "Switch" muss aber schon beim komplieren (./configure) übergeben werden. Normalerweise würde ich mir die Pakete aber mit apt-get installieren. Kann ich das dann nicht mehr und muss die Sourcen downloaden?

Wenn ich die Sourcen kompilieren muss, wie stelle ich dann die weiteren Dinge ein (z.B. maxload)? Bei Debian werden sonst Dateien mit dem Variablennamen angelegt, die den Wert enthält. Bei anderen Distris werden sie aber beim Programmaufruf übergeben.

Ich weiß, die letzte Frage hätte ich auch testen können. Aber wo ich schon mal dabei bin mich schlauer zu machen ...

Danke!
-sallo

[WCM]Manx
11.05.05, 12:14
Hi!

zur Info: für pure-ftpd (1.0.19-4) (Debian testing)


root@gateway:~# cd /tmp
root@gateway:/tmp# apt-get source pure-ftpd
root@gateway:/tmp# cd pure-ftpd-1.0.19/debian/
root@gateway:/tmp/pure-ftpd-1.0.19/debian# cat README.Debian
...
Virtual Chroots
---------------

Virtual chroots are currently not enabled in the Debian packages.
On one hand couple of users reported that this feature would be useful
for them, but on the other hand enabling this compilation option might
render the packages useless for other users.

Grüße

Manx

PS: Option in die debian/rules mit reinnehmen "fakeroot debian/rules binary" should build it for you, wenn alle developement Pakete vorhanden sind ;)

sallo
11.05.05, 13:45
Sorry,
aber ich verstehe leider nicht wie ich die gewünschte Option nun einschalten kann.

Debian/rules sagt mir leider nichts :(

Wäre nett, wenn du etwas ausführlicher beschreiben könntest wie das nun einschalte.

-sallo

[WCM]Manx
11.05.05, 13:55
Hi!

Meine Stichwörter sollten Dich ja nur auf die richtige Fährte bringen ;)

z.B http://www.debian-administration.org/?article=20

Du musst die /tmp/pure-ftpd-1.0.19/debian/rules Datei anpassen!

Grüße

Manx

sallo
11.05.05, 20:59
Ich habe mir die Quellen heruntergeladen und die Datei ./debian/rules entsprechend geändert.



optflags=--with-everything --with-pam --with-privsep --with-tls --with-virtualchroot


Nun wollte ich mir eine deb-Datei erstellen, leider schlägt dieses fehl.



mrburns:/tmp/pure-ftpd-1.0.19# debuild
dpkg-buildpackage: source package is pure-ftpd
dpkg-buildpackage: source version is 1.0.19-4
dpkg-buildpackage: source maintainer is Stefan Hornburg (Racke) <racke@linuxia.de>
dpkg-buildpackage: host architecture is i386
dpkg-checkbuilddeps: Unmet build dependencies: libpam-dev libcap-dev libldap2-dev libmysqlclient10-dev postgresql-dev libssl-dev
dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: (Use -d flag to override.)
debuild: fatal error at line 765:
dpkg-buildpackage failed!


Auch wenn ich das entsprechende Flag '-d' setze, führt dieses leider nicht zum gewünschten Ergebnis ...



mrburns:/tmp/pure-ftpd-1.0.19# debuild -d
dpkg-buildpackage: source package is pure-ftpd
dpkg-buildpackage: source version is 1.0.19-4
dpkg-buildpackage: source maintainer is Stefan Hornburg (Racke) <racke@linuxia.de>
dpkg-buildpackage: host architecture is i386
debian/rules clean
dh_testdir
dh_testroot
/usr/bin/make clean
make[1]: Entering directory `/tmp/pure-ftpd-1.0.19'
make[1]: *** Keine Regel, um »clean« zu erstellen. Schluss.
make[1]: Leaving directory `/tmp/pure-ftpd-1.0.19'
make: [clean] Fehler 2 (ignoriert)
rm -f build-stamp configure-stamp config.status
rm -rf src/.deps puredb/src/.deps src/vanilla src/ldap src/mysql src/postgresql
dh_clean
dpkg-source -b pure-ftpd-1.0.19
dpkg-source: building pure-ftpd using existing pure-ftpd_1.0.19.orig.tar.gz
dpkg-source: building pure-ftpd in pure-ftpd_1.0.19-4.diff.gz
dpkg-source: building pure-ftpd in pure-ftpd_1.0.19-4.dsc
debian/rules build
dh_testdir
/usr/bin/make clean
make[1]: Entering directory `/tmp/pure-ftpd-1.0.19'
make[1]: *** Keine Regel, um »clean« zu erstellen. Schluss.
make[1]: Leaving directory `/tmp/pure-ftpd-1.0.19'
make: [src/vanilla/pure-ftpd] Fehler 2 (ignoriert)
./configure --prefix=/usr --mandir='${prefix}'/share/man --sysconfdir=/etc/pure-ftpd CFLAGS=-DMAX_USER_LENGTH=128U --with-everything --with-pam --with-privsep --with-tls --with-virtualchroot
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for library containing strerror... none required
checking for perl... /usr/bin/perl
checking for python... /usr/bin/python
checking for ANSI C header files... yes
checking whether stat file-mode macros are broken... no
checking whether time.h and sys/time.h may both be included... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking ioctl.h usability... no
checking ioctl.h presence... no
checking for ioctl.h... no
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/fsuid.h usability... yes
checking sys/fsuid.h presence... yes
checking for sys/fsuid.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking for sys/mount.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/ptrace.h usability... yes
checking sys/ptrace.h presence... yes
checking for sys/ptrace.h... yes
checking security/pam_appl.h usability... no
checking security/pam_appl.h presence... no
checking for security/pam_appl.h... no
checking security/pam_misc.h usability... no
checking security/pam_misc.h presence... no
checking for security/pam_misc.h... no
checking security/pam_filter.h usability... no
checking security/pam_filter.h presence... no
checking for security/pam_filter.h... no
checking sgtty.h usability... yes
checking sgtty.h presence... yes
checking for sgtty.h... yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking varargs.h usability... no
checking varargs.h presence... no
checking for varargs.h... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking CoreFoundation/CoreFoundation.h usability... no
checking CoreFoundation/CoreFoundation.h presence... no
checking for CoreFoundation/CoreFoundation.h... no
checking POSIX termios... yes
checking whether byte ordering is bigendian... no
checking return type of signal handlers... void
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for pid_t... yes
checking for off_t... yes
checking for mode_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct tm.tm_gmtoff... yes
checking whether timezone is scalar... yes
checking for nlink_t... yes
checking for dev_t... yes
checking for ino_t... yes
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for mode_t... (cached) yes
checking size of mode_t... 4
checking for connect... yes
checking for gethostbyname... yes
checking for gethostbyname... (cached) yes
checking for sendfile in -lsendfile... no
checking for socklen_t... yes
checking for ssize_t... yes
checking for sig_atomic_t... yes
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking if malloc debugging is wanted... no
checking for cap_init in -lcap... no
checking for getspnam... yes
configure: error: PAM headers not found.
make: *** [src/vanilla/pure-ftpd] Fehler 1
debuild: fatal error at line 765:
dpkg-buildpackage failed!


Kann mir vielleicht wer sagen was ich falsch mache?

Danke!
-sallo

[WCM]Manx
11.05.05, 21:35
Hi!

Ich hab's grad getestet:



root@gateway:/tmp# apt-get source pure-ftpd
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
Es müssen 562kB der Quellarchive geholt werden.
Hole:1 http://ftp.de.debian.org sarge/main pure-ftpd 1.0.19-4 (dsc) [764B]
Hole:2 http://ftp.de.debian.org sarge/main pure-ftpd 1.0.19-4 (tar) [539kB]
Hole:3 http://ftp.de.debian.org sarge/main pure-ftpd 1.0.19-4 (diff) [23,0kB]
Es wurden 562kB in 7s geholt (78,3kB/s)
dpkg-source: extracting pure-ftpd in pure-ftpd-1.0.19
root@gateway:/tmp# ll
insgesamt 572
drwxrwxrwt 3 root root 4096 2005-05-11 20:21 .
drwxr-xr-x 24 root root 4096 2005-05-10 13:24 ..
drwxr-xr-x 11 manfred manfred 4096 2005-05-11 20:21 pure-ftpd-1.0.19
-rw-r--r-- 1 root root 23019 2004-09-28 21:47 pure-ftpd_1.0.19-4.diff.gz
-rw-r--r-- 1 root root 764 2004-09-28 21:47 pure-ftpd_1.0.19-4.dsc
-rw-r--r-- 1 root root 538609 2004-07-09 17:32 pure-ftpd_1.0.19.orig.tar.gz
root@gateway:/tmp#
root@gateway:/tmp# apt-get build-dep pure-ftpd
...
root@gateway:/tmp# cd pure-ftpd-1.0.19
rules Datei anpassen!
root@gateway:/tmp/pure-ftpd-1.0.19# fakeroot debian/rules binary
... ...
... ...
dpkg-deb: baue Paket »pure-ftpd« in »../pure-ftpd_1.0.19-4_i386.deb«.
dpkg-deb: baue Paket »pure-ftpd-mysql« in »../pure-ftpd-mysql_1.0.19-4_i386.deb«.
dpkg-deb: baue Paket »pure-ftpd-postgresql« in »../pure-ftpd-postgresql_1.0.19-4_i386.deb«.
dpkg-deb: baue Paket »pure-ftpd-ldap« in »../pure-ftpd-ldap_1.0.19-4_i386.deb«.
root@gateway:/tmp/pure-ftpd-1.0.19# cd ..
root@gateway:/tmp# ll
insgesamt 1120
drwxrwxrwt 3 root root 4096 2005-05-11 20:37 .
drwxr-xr-x 24 root root 4096 2005-05-10 13:24 ..
drwxr-xr-x 11 manfred manfred 4096 2005-05-11 20:36 pure-ftpd-1.0.19
-rw-r--r-- 1 root root 23019 2004-09-28 21:47 pure-ftpd_1.0.19-4.diff.gz
-rw-r--r-- 1 root root 764 2004-09-28 21:47 pure-ftpd_1.0.19-4.dsc
-rw-r--r-- 1 root root 87038 2005-05-11 20:37 pure-ftpd_1.0.19-4_i386.deb
-rw-r--r-- 1 root root 538609 2004-07-09 17:32 pure-ftpd_1.0.19.orig.tar.gz
-rw-r--r-- 1 root root 156028 2005-05-11 20:37 pure-ftpd-common_1.0.19-4_all.deb
-rw-r--r-- 1 root root 93262 2005-05-11 20:37 pure-ftpd-ldap_1.0.19-4_i386.deb
-rw-r--r-- 1 root root 94798 2005-05-11 20:37 pure-ftpd-mysql_1.0.19-4_i386.deb
-rw-r--r-- 1 root root 94382 2005-05-11 20:37 pure-ftpd-postgresql_1.0.19-4_i386.deb

Manx

sallo
11.05.05, 22:52
Danke!

Jetzt habe ich es auch geschafft :)

Hatte sowas noch nie gemacht und derbe Lücken in meinem Wissen. Nun läuft alles bestens und ich kann mittels symbolischen Links aus meinem Chroot ausbrechen.

Werde deine "Anleitung" gleich mal in meine privaten HowTo's aufnehmen.

n8
-sallo