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 02-04-2009, 03:18 AM   #1
jack111
LQ Newbie
 
Registered: Jul 2008
Posts: 27

Rep: Reputation: 15
create limited user freebsd


I would like to create a very limited user in freebsd and chown a folder for this particular user.
The user will need to have ftp access to this folder.
This user is going to be used by the public so the access needs to be very limited.
what is the best way to go about setting this up.
 
Old 02-05-2009, 12:24 PM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Try looking into "chroot environments". If that doesn't satisfy your needs, try creating the user by specifying their home directory when you issue the "useradd" command, that way, when someone logs in with that account, via FTP, they go straight to that folder (it does not necessarily have to be in "/home" or "/usr".
 
Old 02-06-2009, 04:24 AM   #3
jack111
LQ Newbie
 
Registered: Jul 2008
Posts: 27

Original Poster
Rep: Reputation: 15
php execution

thanks for the replies.
I run apache and php mysql on the server. Can an user upload an php file and cause problems ie hack into the server.
 
Old 02-06-2009, 07:36 AM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Okay - you definitely need to look into "chroot" environments.

When someone transfers a file, via FTP, to the server, chances are you are going to want them to upload it to their home directory. chroot environments "change root" so, instead of the user existing at /home/user on the actual filesystem, they will exist at /home/user, but it will look as though they are at the root directory (/).

This way, you can control the tools/commands they have access to and they can do no harm to the system - only the chroot environment.
 
Old 02-06-2009, 02:32 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by jack111
I would like to create a very limited user in freebsd and chown a folder for this particular user.
The user will need to have ftp access to this folder.
This user is going to be used by the public so the access needs to be very limited.
what is the best way to go about setting this up.
Start by reading here: http://www.freebsd.org/doc/en_US.ISO...twork-ftp.html

I recommend using the base system ftpd. Read the manpages for ftpd(8) and ftpusers(5). Post back if you have questions.

[ Personally, I would put this entire service in a FreeBSD Jail, but that has a learning curve associated with it. ]
 
Old 02-07-2009, 03:23 AM   #6
jack111
LQ Newbie
 
Registered: Jul 2008
Posts: 27

Original Poster
Rep: Reputation: 15
pure ftpd

thanks for the replies.
will this do what I am looking for
http://www.pureftpd.org/project/pure-ftpd
 
Old 02-07-2009, 03:32 AM   #7
da1
Member
 
Registered: May 2007
Distribution: FreeBSD
Posts: 113

Rep: Reputation: 16
yup, pure-ftpd will do the job for you (as long as you set "YES" to "ChrootEveryone" in the pure-ftpd.conf file).

a jail would be the way to go, but it would be a waste of time, as pure-ftpd does this as well. (someone corect me if I'm wrong)
 
  


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
updating FreeBSD 6.0 to FreeBSD 6.2 without Console (single user access) kur1j *BSD 2 08-17-2007 07:12 AM
Limited User Access Jakeh2k1 Red Hat 1 06-07-2005 07:03 AM
Limited permission on FTP user stefane321 Linux - Security 3 03-04-2005 07:21 PM
Create Limited User Accounts epihammer Mandriva 3 05-18-2004 02:52 PM
limited user yuniarti Linux - General 1 01-01-2001 01:58 PM

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

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