[BC3] waarom werkt uploaden niet?

Pagina: 1
Acties:

  • banaan-X
  • Registratie: Februari 2001
  • Niet online
Ik probeer een ftp-server te maken waarbij je als anonymous kunt uploaden in een map upload, en daarin 1 submap aan kunt maken.

Mijn /etc/ftpaccess:
#This file controls the behavior of the wu-ftpd
# ftp server.
#
# If you''re looking for a graphical frontend to
# editing it, try kwuftpd from the kdeadmin
# package.

# Don''t allow system accounts to log in over ftp
deny-uid %-99 %65534-
deny-gid %-99 %65534-
allow-uid ftp
allow-gid ftp

# The ftpchroot group doesn''t exist by default, this
# entry is just supplied as an example.
# To chroot a user, modify the line below or create
# the ftpchroot group and add the user to it.
#
# You will need to setup the required applications
# and libraries in the root directory (set using
# guest-root).
#
# Look at the anonftp package for the files you''ll need.
guestgroup ftpchrool

# User classes...
class all real,guest,anonymous *
class anonftp anonymous *

# Set this to your email address
email root@xs4me.dhs.org

# Allow 2 mistyped passwords
loginfails 2

# Notify the users of README files at login and when
# changing to a different directory
readme README* login
readme README* cwd=*

# Messages displayed to the user
message /welcome.msg login
message .message cwd=*
# Allow on-the-fly compression and tarring
compress yes all
tar yes all

# Prevent anonymous users (and partially guest users)
# from executing dangerous commands
chmod no guest,anonymous
delete no anonymous
overwrite no anonymous
rename no anonymous

# Turn on logging to /var/log/xferlog
log transfers anonymous,guest,real inbound,outbound

# If /etc/shutmsg exists, don''t allow logins
# see ftpshut man page
shutdown /etc/shutmsg

# Ask users to use their email address as anonymous
# password
passwd-check rfc822 warn

upload /var/ftp /upload yes ftpadmin ftpadmin 0444 dirs 3777
upload /var/ftp /upload/* yes ftpadmin ftpadmin 0444 nodirs


--------------------
ftpadmin is dus de administrator voor de ftp-server die de boel moet beheren. Hij is als volgt opgenomen in /etc/passwd

ftpadmin:x:502:502::/var/ftp:/bin/bash

De permissies voor de mappen staan hieronder:

[root@e89108 ftp]# ls -l
total 20
d--x--x--x 2 root root 4096 Apr 16 23:33 bin
d--x--x--x 2 root root 4096 Apr 16 23:33 etc
drwxr-xr-x 2 root root 4096 Apr 16 23:33 lib
drwxr-sr-x 3 root ftp 4096 Apr 20 21:43 pub
drwxrwxrwx 2 ftpadmin ftpadmin 4096 Apr 20 21:31 upload


En toen werkte het dus toch nog niet...
En wat ook erg vreemd is: inloggen met ftpadmin en juist passwd wil ook niet!
Terwijl inloggen met peter:
peter:x:500:500:Peter:/home/peter:/bin/bash
wel wil!!

Waarom werkt het nou niet?

  • banaan-X
  • Registratie: Februari 2001
  • Niet online
Er is toch wel iemand die me wil helpen?
Het lukt me echt niet :'(

  • imdos
  • Registratie: Maart 2000
  • Laatst online: 05-08 12:09

imdos

I use FreeNAS and Ubuntu

guestgroup ftpchrool
dat staat vaut :)
# Don''t allow system accounts to log in over ftp
deny-uid %-99 %65534-
deny-gid %-99 %65534-
allow-uid ftp
allow-gid ftp
Dit vindt ik ook erg vaag!

En verder zou ik je aanraden proftpd te gebruiken. Deze is veel securder en makkelijker op te zetten ook omdat het via de zelfde configuratie als apache werkt :)
deze ondersteund bijna default een gechrooted environment
Draait bij mij al eens zonnetje en heeft een aantal duidelijke config-files op hun site staan!

[url=http://www.proftpd.net]www.proftpd.net[/url

pvoutput. Waarom makkelijk doen, als het ook moeilijk kan! Every solution has a new problem


  • banaan-X
  • Registratie: Februari 2001
  • Niet online
ik heb ftpadmin, en # ervoor geprobeerd, maar dat helpt allebij niet. Gewone gebruikers kunnen trouwens wel prima uploaden.
Kun je het ook zo maken dat gebruikers /var/ftp als hoofddir. zien, dus dat ze niet verder terug omhoog naar /var (bijv) kunnen? Want als dat kan, is het ook goed...

  • banaan-X
  • Registratie: Februari 2001
  • Niet online
Weet iemand al iets voor dit probleem?