Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I would like to know what makes a virtual user in vsftpd (although I suppose it's the same with other ftp daemons too) use "ftp"? I don't understand where the association is being done?
For instance, it's easy to understand that apache uses the "apache" user in Centos, especially given that there's a special directive within httpd.conf. What about ftp then? How does this work exactly?
I think I need to clarify a thing on Apache.
While the httpd process is in initial phases, just after the "administrative" tasks (such binding to the 80 TCP port), the root privileges are droppedto user and group apache.
Differently, for vsftpd the process is run under root privileges.
That said, when a client initiate a FTP session on a vsftpd server, the client must specify the user it wants to use in order to pass the authentication (username + password) phase.
I think I need to clarify a thing on Apache.
While the httpd process is in initial phases, just after the "administrative" tasks (such binding to the 80 TCP port), the root privileges are droppedto user and group apache.
Differently, for vsftpd the process is run under root privileges.
That said, when a client initiate a FTP session on a vsftpd server, the client must specify the user it wants to use in order to pass the authentication (username + password) phase.
I understand, but when you specify a virtual user, things are quite different. It's not a system user, it's actually the "ftp" user's permissions being used. So how come is "ftp" and not another used? This is the case in Centos, at least.
ftp user is a system (uid < 1000 in CentOS 7) username.
You can convince yourself by doing id ftp or grep ftp /etc/passwd.
I do not know what you really mean by virtual user, but maybe the two options of vsftpd.conf: ftp_username and guest_username can achieve what you want.
Obviously I strongly recommend you to read man 5 vsftpd.conf.
ftp user is a system (uid < 1000 in CentOS 7) username.
You can convince yourself by doing id ftp or grep ftp /etc/passwd.
I do not know what you really mean by virtual user, but maybe the two options of vsftpd.conf: ftp_username and guest_username can achieve what you want.
Obviously I strongly recommend you to read man 5 vsftpd.conf.
When I say virtual user, I mean not using the actual system users. By virtual user, I mean, for instance, users taken from a database (for instance, one created with dbload). What I mean by virtual users is what the creator of vsftp means by it. The notion shows up in the vspft.conf manual, also.
It's obvious that the users, eventually, need to use a real system user to actually make actual changes. And that's the "ftp" user. And that's exactly what I'm asking. Why is it ftp, and why not another real user? Where is the association being made?
In man pages it says: ftp_username
This is the name of the user we use for handling anonymous FTP.
Now, I know this is obviously related to allow_anonymous, but I suppose it means, basically, that you are allowed as any user you may choose. Which is quite different from using virtual users. I'm also guessing that it's not related to the hide_ids directive.
So yes, simply reading the manual pages (which I read, partially, when looking for various directives) isn't of much help by itself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.