[SOLVED] New User - vsftpd FTP

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
shadragon
Posts: 3
Joined: 2010/05/31 14:41:05

[SOLVED] New User - vsftpd FTP

Post by shadragon » 2010/05/31 14:52:02

Good Day,

I am using a CentOS Linux V4.3, 2.6.9-34.ELsmp kernel with default settings for vsftpd (No changes to vsftpd.conf)

All I need to do is set up a new user called 'phone'

with read only on their default directory of /var/log/asterisk/cdr-csv

Can anyone assist?

Thanks.

SD

User avatar
AlanBartlett
Forum Moderator
Posts: 9323
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: New User - vsftpd FTP

Post by AlanBartlett » 2010/05/31 15:30:50

Welcome to the [i]CentOS[/i] fora.

The recommended reading for all new members is the [url=https://www.centos.org/modules/newbb/viewforum.php?forum=48]FAQ & Readme First[/url].

To assist you with your query, I shall suggest that you take a look at the [i]adduser[/i] / [i]useradd[/i] manual page and consider using the [i]-d[/i] flag, with [i]/var/log/asterisk/cdr-csv[/i] as its argument, to the [i]adduser[/i] command.

[code]
[b]man adduser[/b]
. . .
[b]adduser -d /var/log/asterisk/cdr-csv[/b]
[/code]

shadragon
Posts: 3
Joined: 2010/05/31 14:41:05

Re: New User - vsftpd FTP

Post by shadragon » 2010/05/31 20:31:25

Hi Alan,

Thanks.

I added the user with default home folder per your instructions after reading the man docs.

If I try to log onto the FTP site the client says:

USER phone
31 Please specify the password.
PASS **********
530 Login incorrect.

Entered the password several times and am sure it is correct. Tried enabling

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list (Only one user inside - phone)

but that got the same error.


I can log on as anonymous, but I get:

USER anonymous
331 Please specify the password.
PASS **********
230 Login successful.
SYST
215 UNIX Type: L8
Keep alive off...
CWD /
250 Directory successfully changed.
Attemping Active mode transfer...
PORT 172,16,0,210,100,243
200 PORT command successful. Consider using PASV.
LIST
550 Permission denied.


When I use "cat /etc/passwd" to list all my users, anonymous is not listed but ftp is.

How / where or even can I change the default path of anonymous?

Failing that, how can I get around the 530 error.

Cheers.

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

[SOLVED] New User - vsftpd FTP

Post by toracat » 2010/06/01 14:24:10

You might want to show us all 'option lines' in your vsftpd.conf.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: New User - vsftpd FTP

Post by pschaff » 2010/06/01 15:17:44

[quote]
shadragon wrote:
...
I am using a CentOS Linux V4.3, 2.6.9-34.ELsmp kernel with default settings for vsftpd (No changes to vsftpd.conf)
...[/quote]

May or may not be related to the vsftpd problems, but you should consider updating to the current release 4.8. CentOS 4.3 is very old and has numerous bugs and security problems. Obsolete releases are not supported, nor is it advisable to be running them.

shadragon
Posts: 3
Joined: 2010/05/31 14:41:05

Re: New User - vsftpd FTP

Post by shadragon » 2010/06/01 20:15:46

Afraid I cannot upgrade. This software is on a commercial phone server and upgrading to "unsupported" software levels invalidates any technical support.

I did find the issue. I was successfully logging on, but the dirlist_enable (The last setting, of course) was set to NO. I set it to YES and everything magically appeared on my FTP client. Seems silly to me to not have a DIR contents viewable by default, but as long as it works. :-)

Here is the working config file, less the comment lines for future users who hit this same issue.

Thank you everyone who assisted.

# This config file is for remote access of an
# Asterisk (Fonality) phone server.
# config file /etc/vsftpd/vsftpd.conf

anonymous_enable=YES
anon_root=/var/log/asterisk
local_enable=YES
local_root=/var/log/asterisk
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
idle_session_timeout=600
ftpd_banner=Welcome to XXXXXXXXX Fonality FTP service.
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list


pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
dirlist_enable=YES

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: New User - vsftpd FTP

Post by toracat » 2010/06/01 20:55:54

Glad to hear that you've got things sorted out. I will mark this thread as "solved".

Post Reply

Return to “CentOS 4 - Server Support”