vsFTP and add a user.

Issues related to configuring your network
hack3rcon
Posts: 728
Joined: 2014/11/24 11:04:37

vsFTP and add a user.

Post by hack3rcon » 2020/08/17 11:43:28

Hello,
I installed the vsFTP and I want to user the current user that I logged to the system as FTP user. I don't like to use below commands to create a new user for FTP:

Code: Select all

# useradd ftpuser
# passwd ftpuser
When I use below command with the current system user then it show me an error:

Code: Select all

# usermod --home /mnt/FTP/ jason
usermod: user jason is currently used by process 795304
What is my problem? is it not possible to use current user as FTP user?

Thank you.

User avatar
TrevorH
Forum Moderator
Posts: 30179
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: vsFTP and add a user.

Post by TrevorH » 2020/08/17 11:53:40

man usermod
CAVEATS
You must make certain that the named user is not executing any processes when this command is being executed if the user's
numerical user ID, the user's name, or the user's home directory is being changed. usermod checks this on Linux. On other
platforms it only uses utmp to check if the user is logged in.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

hack3rcon
Posts: 728
Joined: 2014/11/24 11:04:37

Re: vsFTP and add a user.

Post by hack3rcon » 2020/08/17 13:01:04

TrevorH wrote:
2020/08/17 11:53:40
man usermod
CAVEATS
You must make certain that the named user is not executing any processes when this command is being executed if the user's
numerical user ID, the user's name, or the user's home directory is being changed. usermod checks this on Linux. On other
platforms it only uses utmp to check if the user is logged in.
Should I logout and with another user execute command?

User avatar
jlehtone
Posts: 3270
Joined: 2007/12/11 08:17:33
Location: Finland

Re: vsFTP and add a user.

Post by jlehtone » 2020/08/17 16:30:54

If you did create account 'jason' for vsftp, then why didn't you set its home directory "right" already when you did create the account?

What is wrong with the current home directory of 'jason'? Can't you use that (for whatever you would use /mnt/FTP for)?

hack3rcon
Posts: 728
Joined: 2014/11/24 11:04:37

Re: vsFTP and add a user.

Post by hack3rcon » 2020/08/24 19:53:56

jlehtone wrote:
2020/08/17 16:30:54
If you did create account 'jason' for vsftp, then why didn't you set its home directory "right" already when you did create the account?

What is wrong with the current home directory of 'jason'? Can't you use that (for whatever you would use /mnt/FTP for)?
I don't like to create extra account for FTP. I want to use the current user as FTP account.

User avatar
jlehtone
Posts: 3270
Joined: 2007/12/11 08:17:33
Location: Finland

Re: vsFTP and add a user.

Post by jlehtone » 2020/08/24 22:22:06

Disclaimer: I've newer used a "user"; only anonymous.

Why do you try to move the home of jason?

hack3rcon
Posts: 728
Joined: 2014/11/24 11:04:37

Re: vsFTP and add a user.

Post by hack3rcon » 2020/08/27 10:38:57

jlehtone wrote:
2020/08/24 22:22:06
Disclaimer: I've newer used a "user"; only anonymous.

Why do you try to move the home of jason?
I just want to move the home in the FTP and not system login!!!

User avatar
jlehtone
Posts: 3270
Joined: 2007/12/11 08:17:33
Location: Finland

Re: vsFTP and add a user.

Post by jlehtone » 2020/08/27 13:29:37

Home path of account jason is the home path of account jason. There is only one.

The FTP server serves some directory tree. The home path of account jason either is, or is not within that tree.

hack3rcon
Posts: 728
Joined: 2014/11/24 11:04:37

Re: vsFTP and add a user.

Post by hack3rcon » 2020/08/28 18:22:31

jlehtone wrote:
2020/08/27 13:29:37
Home path of account jason is the home path of account jason. There is only one.

The FTP server serves some directory tree. The home path of account jason either is, or is not within that tree.
Thus, it is not possible to just change the FTP home directory and not real home?

User avatar
jlehtone
Posts: 3270
Joined: 2007/12/11 08:17:33
Location: Finland

Re: vsFTP and add a user.

Post by jlehtone » 2020/08/28 19:10:01

Why did you try to move the account's home, when you actually wanted to set the path that ftp session starts in?
That is confusing.

vsftpd's config has options like local_root and user_config_dir.

Seems possible.

Post Reply

Return to “CentOS 8 - Networking Support”