LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-07-2016, 02:46 PM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
the "ftp" user in Centos


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?
 
Old 04-07-2016, 06:08 PM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

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.
 
Old 04-09-2016, 07:28 AM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by tshikose View Post
Hi,

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.
 
Old 04-10-2016, 08:57 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

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.
 
Old 04-10-2016, 12:46 PM   #5
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by tshikose View Post
Hi,

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.
 
Old 04-10-2016, 01:08 PM   #6
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

Now, I have a better understanding of your needs.
Unfortunately, I have never played with vsftpd using users that are not system users.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help setting up "ftp only" user account with vsftpd GeekyAdam Linux - Software 2 06-11-2011 01:54 PM
"Difference between centos and slackware" and "also how to install scratch on centos" vijayendra.uppalapati Slackware 2 01-23-2011 03:14 AM
"How can I configure pure-ftp in my CentOS server in non-anonymous mode?" sandeepbista Linux - Server 1 11-05-2010 03:03 AM
C -communicating with system("ftp"); using "program|ftp>>myfifo" probably hansschmucker Programming 1 03-23-2005 01:39 PM
FTP Error, Help needed. "Must perform authentication before identifying USER" acalvin Linux - Software 0 07-27-2003 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration