LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2005, 01:09 AM   #1
istvank
Member
 
Registered: Dec 2005
Distribution: CentOS 5.8
Posts: 34

Rep: Reputation: 15
vsftpd virtual users configuration


Hello,

I managed to setup vsftpd with virtual users as it is shown here:ftp://vsftpd.beasts.org/users/cevans...USERS_2/README

Now I have one home directory for all the users. Users have different rights. Some have write access some have download only access.

But now I would like to take a step further the vsftpd setup. I would like that some users to have access to some folders.
Like this:

user1 can access folder1 and folder2
user2, user4 can access only folder2
user3, user5 can access only folder1

Does anybody know if this is possible with vsftpd?? Or is there a trick with virtual domains? Or some workaround?

10x
 
Old 12-09-2005, 03:50 AM   #2
istvank
Member
 
Registered: Dec 2005
Distribution: CentOS 5.8
Posts: 34

Original Poster
Rep: Reputation: 15
Please tell me at least if it's possible to do this with vsftpd, so I don't dig in vain!
 
Old 01-13-2006, 01:45 PM   #3
istvank
Member
 
Registered: Dec 2005
Distribution: CentOS 5.8
Posts: 34

Original Poster
Rep: Reputation: 15
I still didn't find any solution. Anybody knows how to use groups with virtual users? Is it possible? At least tell give me a link, an email, something I can start with.

10x
 
Old 01-27-2006, 08:51 PM   #4
bearqst
LQ Newbie
 
Registered: Jul 2005
Distribution: RHE4, WB4, FC3
Posts: 6

Rep: Reputation: 0
have you looked at ftp://vsftpd.beasts.org/users/cevans...ftpd-2.0.4/FAQ
 
Old 01-28-2006, 03:44 AM   #5
istvank
Member
 
Registered: Dec 2005
Distribution: CentOS 5.8
Posts: 34

Original Poster
Rep: Reputation: 15
Yes indeed there are a few hints in the FAQ. But they are just hints, they presume that you have good knowledge of linux in other areas...
Here I copied the the parts from the FAQ which might be related to my problem

Quote:
Q) Can I restrict users to their home directories?
A) Yes. You are probably after the setting:
chroot_local_user=YES
Can I restrict more than one user to the same home directory?

Quote:
Q) Help! What are the security implications referred to in the
"chroot_local_user" option?
A) Firstly note that other ftp daemons have the same implications. It is a
generic problem.
The problem isn't too severe, but it is this: Some people have FTP user
accounts which are not trusted to have full shell access. If these
accounts can also upload files, there is a small risk. A bad user now has
control of the filesystem root, which is their home directory. The ftp
daemon might cause some config file to be read - e.g. /etc/some_file. With
chroot(), this file is now under the control of the user. vsftpd is
careful in this area. But, the system's libc might want to open locale
config files or other settings...
Can I restrict all user to the a home directory?

Quote:
Q) Help! How do I integrate with LDAP users and logins?
A) Use vsftpd's PAM integration to do this, and have PAM authenticate against
an LDAP repository.
I don't know what is LDAP, but somebody told me the LDAP combined with chroot_local_user might do what I need.

Quote:
Q) Help! Does vsftpd support virtual users?
A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd.conf. This
has the effect of mapping every non-anonymous successful login to the local
username specified in "guest_username". Then, use PAM and (e.g.) its pam_userdb
module to provide authentication against an external (i.e. non-/etc/passwd)
repository of users.
Note - currently there is a restriction that with guest_enable enabled, local
users also get mapped to guest_username.
There is an example of virtual users setup in the "EXAMPLE" directory.
Can I map virtual users to more than one local user?

Quote:
Q) Help! Does vsftpd support different settings for different users?
A) Yes - in a very powerful way. Look at the setting "user_config_dir" in the
manual page.
This doesn't include file access restriction.


Quote:
Q) Help! Will vsftpd authenticate against an LDAP server? What about a
MySQL server?
A) Yes. vsftpd uses PAM for authentication, so you need to configure PAM
to use pam_ldap or pam_mysql modules. This may involve installing the PAM
modules and then editing the PAM config file (perhaps /etc/pam.d/vsftpd).
Don't know what can LDAP do.

Quote:
Q) Help! Does vsftpd support hiding or denying certain files?
A) Yes. Look at the hide_file and deny_file options in the manual page.
This is intresting. The manpage says that it works for directories too. But can this be used for a group or all virtual users? Or do I have make the restriction for each user and each directory?

Does file permissions work with virtual users?
 
Old 01-28-2006, 11:57 AM   #6
bearqst
LQ Newbie
 
Registered: Jul 2005
Distribution: RHE4, WB4, FC3
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by istvank
Can I restrict more than one user to the same home directory?
Yes, make directory X the home directory for all users you want to have access to it, or make it a group

Quote:
Originally Posted by istvank
Can I restrict all user to the a home directory?
See above

Quote:
Originally Posted by istvank
I don't know what is LDAP, but somebody told me the LDAP combined with chroot_local_user might do what I need.
LDAP = Lightweight Directory Access Protocol = Google LDAP for definations and a more indepth description

You shouldn't need LDAP to accomplish what you want. You need to set the permissions and user directory to the same levels/directory.

Quote:
Originally Posted by istvank
Can I map virtual users to more than one local user?
Don't know, haven't tried this

Quote:
Originally Posted by istvank
This doesn't include file access restriction.
configure restrictions by the file or directories

Quote:
Originally Posted by istvank
Don't know what can LDAP do.
See above

Quote:
Originally Posted by istvank
Does file permissions work with virtual users?
Yes

I haven't tried to make the exact same configuration settings you appear to be, but basic network structure and user permissions should accomplish what you want. Read up on permissions and network / directory structure, why I posted the link to the FAQ, yes they have a lot of "suggestion" but also give you insight to the ability to accomplish what you want (one of your questions - can it be done) and some direction to do it.

Setting up a Linux server and structuring the pemissions and user directory correctly isn't as easy as say point and click like MS, but it is a lot more powerful and secure. You might want to get a couple books, your local library should have some good on Linux server config

Good luck
 
  


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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
vsftpd and virtual users chrull Linux - Software 0 05-14-2004 05:09 PM
vsftpd and virtual users poweroff Linux - General 0 02-26-2004 07:04 AM
vsftpd and virtual users JeffV Linux - Software 2 11-14-2003 09:47 AM
Installation vsftpd - Virtual Users Yoss Linux - Networking 7 07-11-2003 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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