LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-20-2006, 07:10 PM   #1
S.R. Noble
LQ Newbie
 
Registered: Nov 2005
Location: Whidbey Island, Wa.
Distribution: debian
Posts: 10

Rep: Reputation: 0
proftpd on deb etch


I want to upload web files via ftp from my windows xp box to my newly installed etch machine both of which are on our home LAN. To that end I have installed proftpd on my linux (etch) machine. I have been using a program called FTP Master Professional 2.3 on the windows machine, and before, when I was running Sarge and wu-ftpd on the Linux box, everything worked just fine.

I have proftpd configured for anonymous transfers. The problem is, now, there seems to be no place for the files to land under proftpd. Either that or I don't have the permissions set right for whatever directory is supposed to receive them. I am able to make an ftp connection on port 21 both from the FTP Master program and windows explorer, but when I try to transfer files I get a critical transfer error message.

The remote directory that shows up in the windows ftp remote window is "/", i.e. root. It shows a folder with two dots next to it but it goes no further up the tree when I click on it, so I can only assume it's at the very top. Funny thing is under the folder in the remote directory listing it shows the proftpd welcome message file as though it were the only file under the root directory. On my linux machine I find that welcome file in /home/ftp. When I had wu-ftpd there was a directory called home/ftp/incomming that received my transfers.

I can't find anything in the documentation that I've read and scanned that talks specifically about how the repository for incoming files is supposed to be set up.
Any help?

Oh, I checked and the user (ftp) and group (nogroup) exist, and I changed the permissions on /ftp to 775.
Thanks, S.R. Noble
 
Old 12-21-2006, 05:15 AM   #2
diilbert
Member
 
Registered: Nov 2003
Location: North of the Border
Distribution: Gentoo & Debian
Posts: 155

Rep: Reputation: 30
I am pretty sure that in your vsftpd config you have to associate the anon with a real user. The problem in your case is that the real user probably does not have a shell assigned to them. I previous had this type of problem. Something like: "usermod -s /bin/bash [username]" should fix the problem.

Otherwise, does the "/home/ftp/incoming" folder that exist ? And if so it needs to have the correct permissions.
 
Old 12-21-2006, 09:42 PM   #3
S.R. Noble
LQ Newbie
 
Registered: Nov 2005
Location: Whidbey Island, Wa.
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks, Diilbert. Anonymous is aliased to ftp which is a real user on the system, and is the designated user in the virtual host configuration.

Secondly, I have made sure that directory "ftp" is owned by user "ftp", and I created a directory called "incoming" under ftp. Just for experimental purposes, I gave both these directories 777 privileges.

I tried using a different virtual host configuration from the sample vhconfigs at http://www.proftpd.org/docs/configs/anonymous.conf because I realized the original one I was given in the installation did not allow uploads. Still no luck. I am beginning to think the problem is in the way the network was configured when I did the net installation of etch. Perhaps in hosts or hosts.allow or something. But again, I can see the directories in my windows ftp program, and I am deffinately able to connect from windows to linux.
 
Old 12-22-2006, 05:02 PM   #4
restless
Member
 
Registered: Feb 2003
Location: Belgium
Distribution: Debian
Posts: 166

Rep: Reputation: 31
Could you please paste your proftpd.conf file here please.

also I would suggest not to create a shell account for ftp users. Proftpd has the option to allow users who don't have shell access.
Just add "RequireValidShell no" to your proftpd.conf file.

indeed debian/proftpd uses /home/ftp as default ftp directory. But once again please paste your proftpd.conf file here so we can have a look which makes it easier for us to help you
 
Old 12-22-2006, 06:54 PM   #5
S.R. Noble
LQ Newbie
 
Registered: Nov 2005
Location: Whidbey Island, Wa.
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
So here is the latest of many permutations I have tried. The first being the one that came with proftpd when I installed it with apt. I had followed the instructions given by: http://debianhelp.co.uk/proftp.htm which I realized later would not work for what I wanted to do.

by the way, when I looked into the logs I noticed that it never seems to get past initiating the chroot. Could this be a clue?

#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.

# Includes DSO modules
Include /etc/proftpd/modules.conf

UseIPv6 off

ServerName "debiansteve"
ServerType standalone
DeferWelcome off

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"

DenyFilter \*.*/

# Port 21 is the standard FTP port.
Port 21


MaxInstances 30

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

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022

AllowOverwrite on

# PersistentPasswd off

# UseSendFile off

TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log

<IfModule mod_tls.c>
TLSEngine off
</IfModule>

<IfModule mod_quota.c>
QuotaEngine on
</IfModule>

<IfModule mod_ratio.c>
Ratios on
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?pag...LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
#
<IfModule mod_ctrls.c>
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
#
<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
#
# A basic anonymous
#
<Anonymous ~ftp>
User ftp
Group nogroup
#
UserAlias anonymous ftp
#
# # Cosmetic changes, all files belongs to ftp user
DirFakeUser on ftp
DirFakeGroup on ftp
#
RequireValidShell off
#
# # Limit the maximum number of anonymous logins
MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
#
<Directory ftp/*>
<Limit READ>
DenyAll
</Limit>
<Limit STOR>
AllowAll
</Limit>
</Directory>

<Limit LOGIN>
AllowAll
</Limit>

# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
</Anonymous>
 
Old 12-23-2006, 06:52 AM   #6
restless
Member
 
Registered: Feb 2003
Location: Belgium
Distribution: Debian
Posts: 166

Rep: Reputation: 31
a few more questions
are you using a router? This might cause problems when using passive mode
try disabling the delay module for a bit and see what it gives
are you able to login with your root user or other 'normal' users?
why are you using the proftpd user to run it instead of nobody?
 
Old 12-24-2006, 07:13 PM   #7
S.R. Noble
LQ Newbie
 
Registered: Nov 2005
Location: Whidbey Island, Wa.
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
I am on DSL so I have a router on the interface with my service provider, but otherwise no router within the LAN. When you ask if I am able to log in, I am not sure what you mean. Obviously I wouldn't be able to do anything if I couldn't log in as root, and like I say, I have already done a lot of different thins
As far as why proftpd is being used as the daemon user, I am not sure why the debian folks from whose repository I got this package set it up that way, but user nobody seems to not be favored for Apache either. Apache uses www-data for both user and group when configured for Debian. Not that you couldn't use anything you wanted, provided every thing was in order. I think it might have something to do with other programs (daemons) using nobody and not wanting too many of them being run by the same user.
Thanks for giving this some thought.
 
Old 12-27-2006, 09:14 AM   #8
S.R. Noble
LQ Newbie
 
Registered: Nov 2005
Location: Whidbey Island, Wa.
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
restless, Upon further meditation on what you meant when you asked if I could log in as root or as normal user, I realized you meant can I log in from remote client as either of those, and so I tried and guess what?; I can. Not only that I can upload files as either of those two users using their respective passwords. What this means is that the anonymous user must need a password or, as I found out from: http://www.proftpd.org/docs/faq/linked/faq-ch5.html , an unmatchable password. So that was my problem. Thanks for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X won't work in Deb Etch mattd7591 Linux - Hardware 14 12-16-2006 02:59 PM
Disabling the chroot in proftpd and enabling root logins on ssh/proftpd jon_k Linux - Software 1 06-16-2004 10:27 AM
Is "kernel-image-x_i386.deb or i586.deb the right image for P4 processor? davidas Debian 1 04-06-2004 03:50 AM
Can apt4rpm use deb repositories or install .deb packages? raylpc Linux - General 0 08-18-2003 01:49 AM
proftpd --- need help? could someone post a working proftpd.conf i could look at ZooRoPa Linux - Networking 1 04-02-2003 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration