Hi I am configuring VsFTPd 2.2.2 server on Debian 5.0. I want user after login can see and edit just two dirs:

/home/user/
/var/www/project1/
/var/www/project2/

Possible solutions

  1. I can Chroot user just in one of this directories. But I dont want to use symlinks or "mount --bind" because I have a lot of users and I dont want to have very big fstab file. Also the user should see exactly "/var/www/project1/" but not /home/user/var-www-project1/.

  2. I can set local_root=/. In this case user will see all dirs(bin dev etc lib lost+found mnt proc sbin sent sys usr boot emul home lib64 media opt root selinux srv tmp var). It also does not satisfy me :(

link|improve this question
feedback

3 Answers

Vsftp config

link|improve this answer
In fact I want option: deny_file=NOT_/home/user,NOT_/var/project1,NOT_/var/project2 – irolla Jul 26 '10 at 13:24
feedback

MAN vsftpd hide_file hide_file This option can be used to set a pattern for filenames (and directory names This option can Be Used to set a pattern for filenames (and directory names etc.) which should be hidden from directory listings. etc..) Which Should Be hidden from directory listings. Despite being hidden, Despite Being hidden, the files / directories etc. the files / directories etc.. are fully accessible to clients who know what Fully accessible to customers are Who Know What names to actually use. Actually names to use. Items will be hidden if their names contain the string Items Will Be hidden if Their Names Contains the string given by hide_file, or if they match the regular expression specified by hide_file a sealed envelope, or If They match the regular expression specified by hide_file. hide_file. Note that vsftpd's regular expression matching code is a simple Note That vsftpd's regular expression matching code is simple to implementation which is a subset of full regular expression functionality. WHICH IS implementation has subset of full regular expression Functionality.

See

deny_file deny_file for details of exactly what regex syntax is supported. for details of regex syntax Exactly What IS Supported. Example: hide_file={.mp3,.hidden,hide,h?} Example: hide_file = (*. mp3,. Hidden, hide *, h?)

link|improve this answer
I've already read it. Unfortunatelly I dont want to list all dirs that I want to deny/hide. – irolla Jul 26 '10 at 13:41
i also trying in my test server wait for same time i'll test and then i'll let you know!! – Rajat Jul 26 '10 at 13:59
feedback

I also think there's no way to do that, appart using the hide_file.

(The alternative i tried which is not one because i won't work was: 1. Creating a new dir which serves as a container 2. Putting in that new dir one symbolic link for each directory i want to allow accces to 3. Jailing the user in that new dir => But it won't work because of the jail... : The user just can't get out of the new dir, so he can't use the symbolic links...)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown