Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 48578  / 2 Years ago, sun, september 11, 2022, 5:40:59

I wish to configure vsftpd in 11.10 so that when a user connects he is shown or redirected to a specific folder. The name of the folder is not related to the user or home folder. It is related to a folder in /var/www. For example:



If user cyrex logs in ftp he is redirected to /var/www/gamers or at least shown a gamers folder inside his home folder that redirects to /var/gamers.
If user camelot logs in ftp he is redirected to /var/www/food or at least shown a food folder inside his home folder that redirects to /var/food.
...



The thing he should not leave his home folder and can only access folders inside his home folder that are redirected to other parts like the /var/www/FOLDERS.



UPDATE: In one way of configuration the user should see his home folder and also a folder that redirects him to /var/www/UserFolder. In another way of configuring VSFTPD the user should just be redirected to /var/www/UserFolder without even seeing his home folder, just the var/www specific to him. Can both methods be shown in one answer so I can test both to see which one is better.



What is the easier way to do this.


More From » ftp

 Answers
5

You just have to modify the startup call for vsftpd. The user_config_dir argument will tell the server to look for a configuration in the directory /etc/vsftpd_user_conf/luis if the user luis logs in. Analogously with any other user that logs in. I guess that if no configuration file is found the server will fallback to the default one.



Anyway, take a quick read at this manual page (which you can access too from the terminal with man vsftpd) : http://vsftpd.beasts.org/vsftpd_conf.html



This other guide can help you with using custom directories for your server: http://gofedora.com/how-to-configure-secure-ftp-server-vsftpd/


[#42473] Monday, September 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
giccolla

Total Points: 161
Total Questions: 124
Total Answers: 117

Location: Aland Islands
Member since Wed, Nov 17, 2021
3 Years ago
giccolla questions
Sun, Oct 17, 21, 05:39, 3 Years ago
Mon, Aug 1, 22, 02:00, 2 Years ago
Sun, Nov 21, 21, 08:21, 3 Years ago
;