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?
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?