0

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 :(

2

Vsftp config

  • In fact I want option: deny_file=NOT_/home/user,NOT_/var/project1,NOT_/var/project2 – irolla Jul 26 '10 at 13:24
2
MAN vsftpd hide_file

This option can be used to set a pattern for filenames (and directory names etc.) which should be hidden from directory listings. Despite being hidden, the files / directories etc.. are fully accessible to clients who know what names to actually use. Items will be hidden if their names contain the string given by hide_file, or if they match the regular expression specified by hide_file. Note that vsftpd's regular expression matching code is a simple implementation which is a subset of full regular expression functionality.

See deny_file for details of exactly what regex syntax is supported.

Example: hide_file={*.mp3,.hidden,hide*,h?}

  • 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
0

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...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy