LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-18-2005, 03:32 AM   #1
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
FTPd Question (non anonymous)


Hi there again!

I'm trying to create an FTP server with FreeBSD to share files with friends and stuff. I've got anonymous ftp to work without a problem. However, that's not quite what I want, I want to create an user _with_ password. This is FreeBSD 4.10-RELEASE and this is what I did...

1) First, I've added an user, let's say, tux.
2) I made sure that this user is created under the class FTP.
3) it has password

This user default's home directory is /home/tux. I can login into my FTP from inside and outside my network (forwarded port 21 on my router) without any problems. Here is the problem:

- Anybody connected to my FTP as tux can access the folders _outside_ /home/tux, even my root partition. Indeed they can't write anything outside /tux/incoming, but still, I dislike it a lot. With anonymous ftp, I did not have this problem. /home/ftp is the 'highest' somebody can get inside my directories in my anonymous FTP.

How do I change this behavior so that /home/tux is the only folder peoples can see? Any suggestions?

Thanks in advance

P.S: I'm not using any fancy FTP server as proftpd or anything, but the default ftpd shipped with FreeBSD.

P.S:2 I don't think this is a FreeBSD only behavior, but still, I decided to put it in here, since I'm using FreeBSD. Any Linux users are welcome with suggestions. Thanks

Last edited by Mega Man X; 01-21-2005 at 02:01 AM.
 
Old 01-18-2005, 10:17 AM   #2
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
handbook 23.9.2 has this:

Quote:
You may want to restrict the access of some users without preventing them completely from using FTP. This can be accomplished with the /etc/ftpchroot file. This file lists users and groups subject to FTP access restrictions. The ftpchroot(5) manual page has all of the details so it will not be described in detail here.
I don't know more about it than what's on the man page, but that might help, or at least give something to search off of.


Last edited by Genesee; 01-18-2005 at 10:18 AM.
 
Old 01-18-2005, 11:13 AM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Original Poster
Rep: Reputation: 65
Oh my, great post Genesee!. It's as they say: If you ever get a problem with an *nix box, ask a Slackware user . Worked like a charm!!! This is what I did:

1) created the file /etc/ftpchroot (I did not have that file)
touch /etc/ftpchroot

2) edit that file, so I could limit all tux user from the ftp wheel to his login folders only:
tux
@ftp


3) restarted the ftpd and have fun!

Thanks again mate!

Have a nice day

Last edited by Mega Man X; 01-18-2005 at 11:15 AM.
 
Old 01-18-2005, 12:11 PM   #4
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
no problem - glad to hear that helped

 
  


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
A question about samba anonymous login. tobelinuxer Linux - Software 1 02-02-2005 04:26 PM
files uploaded to anonymous ftp not readable by anonymous TheOneAndOnlySM Linux - Software 2 11-04-2004 07:42 AM
Pure-FTPd, Anonymous account problems. LYNZH Linux - Software 0 09-17-2004 08:26 AM
pure-ftpd question mardanian Linux - Software 0 04-01-2004 12:01 AM
anonymous login question hazza96 Linux - Networking 1 07-16-2001 03:51 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 08:20 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