Discussion Locked

For Linux newbie

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Greetings to all,
I am quite new to Linux (Redhat or any for that matter.)
Just installed RH v8 and have a few questions on FTP that I couldn't solve with the book that came with CDs.

Question 1:
The book says that if I add user's name to /etc/ftpusers file, than this user will not be able to login. I am specifically talking about the user FTP who can login without password. But it still lets user login anyway. Tried to load/unload/reload vsftpd service, rebooted the box, but nothing seems to help.

Question 2:
From the other side, user ROOT is the owner of all folders, including /var/ftp (default login folder for FTP service). However, user ROOT is not allowed to login to FTP server for some reason. Neither is allowed any other user I create, except user FTP.

Question 3:
I would like that when users login to FTP server they will only be able to see their own /home/username folder "mapped" as root, so that they can't go any level above /username folder.

Thanks.

1 reply

by les

Question 1 -
Your reading about wu-fptd, not vsftpd. See below

Red Hat Linux 9 Security Guide (should be the same for 8)
Chapter 5. Server Security
5.6.3.1. Restricting User Accounts

To disable specific user accounts in wu-ftpd, add the username to /etc/ftpusers:

To disable specific user accounts in vsftpd, add the username to /etc/vsftpd.ftpusers

Question 2 -
You should never ftp as root. See the excerpt below form vsftpd faq which explains about directory permissions on the ftp home dir.

Q) Help! I'm getting the error message "refusing to run with writable anonymous
root".
A) vsftpd is protecting against dangerous configurations. The cause of this
message is usually dodgy ownership of the ftp home directory. The home
directory should NOT be owned by the ftp user itself. Neither should it
be writable by the ftp user. A way to fix this is:
chown root ~ftp; chmod -w ~ftp

Question 3 -
This should answer this query:

Q) Can I restrict users to their home directories?
A) Yes. You are probably after the setting:
chroot_local_user=YES

This discussion is closed to new replies.