Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you are using Debian you NEED to install libdb3-util (do NOT attempt to do a filesearch for db_load like I did - you will end up with libdb2-util and have to face problems). libdb3-util is the right one.
After that you can create the db with for instance:db3_load -T -t hash -f /etc/vsftpd/tmp/accounts.txt /etc/vsftpd/accounts.db
i got a question. u created a local user named ftp, then u created your database with your virtual users.
after that u created a pam file and u set all the ftp and base settings.right?
but what did u do with this line?
user_config_dir=/etc/vsftpd/users
I cant find that in my config file. Is it right that u can assign every virtual user an own directory with the next line?
local_root=/usr/local/apache2/htdocs/test
Let us accept that i have 2 virtual users.
User 1 named=Tom
User 2 named=Fritz
can i now put in /etc/vsftpd/users to textfiles first named
Tom second named Fritz and give them the following content?
For Tom:
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_upload_enable=YES
local_root=/usr/local/apache2/htdocs/Tom
write_enable=YES
For Fritz:
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_upload_enable=YES
local_root=/usr/local/apache2/htdocs/Fritz
write_enable=YES
Now if i login as Tom do i get to the path of Tom?
Does it work like this or am i wrong.
If i am wrong how can i reach my planning?
but what did u do with this line?
user_config_dir=/etc/vsftpd/users
From the manpage:
Quote:
This powerful option allows the override of any config option specified in the manual page, on a per-user basis. Usage is simple, and is best illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page!
Quote:
I cant find that in my config file. Is it right that u can assign every virtual user an own directory with the next line?
local_root=/usr/local/apache2/htdocs/test
Wrong. Except you use virtual_use_local_privs=YES. If you do not have that enabled (which is the default) you require anon_root setting.
Quote:
Now if i login as Tom do i get to the path of Tom?
Does it work like this or am i wrong.
If i am wrong how can i reach my planning?
You don't get to the other dir ... but you should consider using my new configuration if you require users to be able to chmod!
i've doing some experiment with your vsftpd.conf and in no way i can get to login a local and a virtual user with the same config...
i can authenticate local users using pam config provided by vsftpd install and virtual users with pam config provided vsftpd virtual user example... but not the two at the same time.
what's your pam configuration, if any?
what r u using for authenticating both local and virtual users at the same time?
local users should not be possible to login. Honestly I've denied ALL local users to login. Remember FTP uses CLEARTEXT password transmission so allowing local users to login is a potential security hole ... and I do not like that.
i set up vsftpd_login.db with my users. Then i created the pam file and copied it to the pam directory. Then i set up this new local user "virtual" with the home directory of my apache served fiels in /var/www/html.
Now i want to allow my users from the vsftpd_login.db to log in one dir per user. I mean
And every user should be able to upload files, delete files, read files like html files. And they should be executable to watch them in an browser.
How can i reach that? Any advises?
Please take a look at the first post since it covers everything. If you require your users to be able to use the chmod command (cgi's) then you should take a look at my 2nd configuration.
Which vsftpd version are you using? I'm using vsftpd 1.2.0 ... Also do not use cmds_allowed ... at least not till I can provide you with a configuration that works for all clients.
well then disable that statement ... and check if it works then. Afterwards upload a file and try chmod 700 <filename>. I do not know when chmod_enable was introduced ... but this should work. Also 1.2.0 is current version and you should consider upgrading ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.