I
I
Ivan Petrov2017-04-03 22:06:10
System administration
Ivan Petrov, 2017-04-03 22:06:10

How to connect via FTP to a specific domain?

Hello. How can I make an ftp connection to a specific domain on an Ubuntu 14.04 server, and not to the user himself. For example, I have an admin user and the domains mysite1.ru, mysite2.ru are already there. And I can't make an ftp connection to only one of the domains. How can I do that? Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Di ExTreMe, 2017-04-03
@r0hack

It all depends on what you have chosen for the
ftp server. Simple ftp users do not need to have shell access. Before you start creating new users, run the command:
Create a new user

useradd имя_пользователя -d /home/имя_папки -m -s /bin/false
passwd имя_пользователя

With the commands above, we created a user (username must be replaced with an unoccupied name) and the corresponding group, assigned and created (the -m switch can be omitted if the directory already exists) the home directory /home/folder_name and chose /bin/false as the user's shell , thereby disabling it for security reasons. With the passwd command, we created the required password for the user.
Limiting user's ftp rights
If necessary, you can close the write permissions for the user, for example, to the home directory and leave them only for some internal folder, for example upload:
On behalf of the superuser, change the rights:
chmod 777 /var/www/mysite2.ru
chown имя_пользователя:имя_пользователя /var/www/mysite2.ru

, by analogy, you can create a user and set the home directory /var/www/mysite3.ru ... etc.

A
Alexander, 2017-04-03
@Mr_Saxa

1st - the question is not very clear,
2nd - you can study ftp as a protocol, that is, all sorts of headers, etc.
3rd - use
software the question is not clear

D
Dimonchik, 2017-04-03
@dimonchik2013

askubuntu.com/questions/575523/how-to-setup-virtua...
www.sherweb.com/blog/how-to-set-up-ftp-access-for-...

M
mureevms, 2017-04-03
@mureevms

Not so long ago, a colleague asked the same question and had to write an instruction: notessysadmin.com/ftp-access-to-website-files. How to make two, three or more will figure it out, it's obvious. Well, and another feature, after the reboot, you will have to mount the directories with your hands, because. Since the note is universal, I leave this question to the tuner - either execute scripts at boot, or make an entry in fstab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question