DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th November 2008
phreud phreud is offline
Port Guard
 
Join Date: Nov 2008
Posts: 22
Thanked 0 Times in 0 Posts
Default FTP users sharing same home directory

I've been thinking about how to setup my VSFTP server the way I want it. I want several users being able to login (not anonymously) with username and password. All users should be "chrooted" to the same directory and confined there.

I was thinking of setups using all kinds of tricks, like virtual users or chrooting everybody to a predefined directory. But, when I think about it, can't I just add users with adduser, giving them the same home dir and no shell (-s nologin)? Are there any problems with this? Will they be able to login at all if I don't set a shell?

Should I be using the -d flag to specify the (shared) home directory? I'm not really sure I understand the semantics in the man page.

Thanks in advance!
Reply With Quote
  #2   (View Single Post)  
Old 11th November 2008
sniper007's Avatar
sniper007 sniper007 is offline
Real Name: Jurif
Fdisk Soldier
 
Join Date: Jun 2008
Location: Slovenia
Posts: 50
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by phreud View Post
But, when I think about it, can't I just add users with adduser, giving them the same home dir and no shell (-s nologin)?
why not? It should work

Quote:
Originally Posted by phreud View Post
Will they be able to login at all if I don't set a shell?
just set /usr/sbin/nologin for shell and ftp access will work at all

Last edited by sniper007; 11th November 2008 at 02:10 PM.
Reply With Quote
  #3   (View Single Post)  
Old 11th November 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

I have a similar setup but with smb instead of ftp and it works great. Just make sure to set the appropriate umask.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #4   (View Single Post)  
Old 11th November 2008
phreud phreud is offline
Port Guard
 
Join Date: Nov 2008
Posts: 22
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by stukov View Post
I have a similar setup but with smb instead of ftp and it works great. Just make sure to set the appropriate umask.
Ok. The same directory will actually be a smb share aswell. I've chosen a somewhat risky samba-setup though, allowing any user from within the LAN to access it without using a username and password. Since I'm the only user in that network I thought it would be fine anyway.

I'll have to read up on umask. I never seem to really get it :-)

Thanks for your replies!
Reply With Quote
  #5   (View Single Post)  
Old 11th November 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

phreud, for samba, you can set your umask directly in your config file. I would have pasted it here for you but the mainboard of that machine just crashed and burned this morning. I'll paste it as soon as the box is repaired.

Good luck.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #6   (View Single Post)  
Old 11th November 2008
phreud phreud is offline
Port Guard
 
Join Date: Nov 2008
Posts: 22
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by stukov View Post
I have a similar setup but with smb instead of ftp and it works great. Just make sure to set the appropriate umask.
Have you gotten around the fact that whenever you add a user to the same home dir, that dir gets chown to the new user? I end up having to chown the home dir every time I've added a new user.

Thanks!
Reply With Quote
  #7   (View Single Post)  
Old 11th November 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Thanked 6 Times in 6 Posts
Default

My users do not have access to their own home. They have access via samba to a "shared folder" instead. My users do not connect via ssh and do not need their own files. It's a workgroup only machine.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
strange "~" directory in home directory gosha OpenBSD General 5 23rd February 2009 06:12 PM
ezjail /usr/home users and groups question neurosis FreeBSD Security 7 8th September 2008 08:40 PM
NFS mount /usr/home? giddyupman FreeBSD General 1 1st September 2008 07:06 PM
Request for Opinions: A secure way of sharing modules TerryP Off-Topic 2 10th August 2008 07:18 PM
Jails - mount: /usr/home: No such file or directory chris FreeBSD General 6 6th August 2008 10:47 PM


All times are GMT. The time now is 07:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick