LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 04: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, 01: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, 05: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, 08: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, 03:32 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
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, 04: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, 04:32 AM   #7
da1
Member
 
Registered: May 2007
Distribution: FreeBSD
Posts: 110

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:12 AM
Limited User Access Jakeh2k1 Red Hat 1 06-07-2005 08:03 AM
Limited permission on FTP user stefane321 Linux - Security 3 03-04-2005 08:21 PM
Create Limited User Accounts epihammer Mandriva 3 05-18-2004 03:52 PM
limited user yuniarti Linux - General 1 01-01-2001 02:58 PM


All times are GMT -5. The time now is 11:01 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration