M
M
MultiGramen2022-04-02 11:34:08
linux
MultiGramen, 2022-04-02 11:34:08

How do you load your sites on Linux systems?

I have a local server for website development. When the development is completed, it is necessary to upload the data to a remote server, but I can not decide on the choice of transfer protocol. Take, for example, downloading via SFTP. They write that this is the safest option, and convenient, but for it you need to create a user who is given rights to directories. I own www-data sites, and it turns out I can’t change it, and if I create files from another user, the rights will be different and the Web server will no longer have access. Setting a password and logging in with the www-data user is also not recommended.

It is clear that there is FTPS, but it is increasingly recommended to use SFTP.
In the system, I have one user for authentication, and the login takes place exclusively with an SSH key, and password authentication is completely disabled.

Renting hosting is also not an option for me, since the server runs software that is necessary not only for websites. After spending a lot of time looking for answers, I did not manage to find them. And unfortunately, sometimes I have to go back to them again.

Questions:
1. How do you transfer files to the server?
2. When is it better to use one or the other protocol?
3. If in this case there is some other option, please direct me in the right direction.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AlexVWill, 2022-04-02
@MultiGramen

How do you transfer files to the server?

We just connect the remote folder /var/www/html as a local one via sshfs and just in the usual explorer (any: Nemo, Nautilus, MS...) copy the data folder as a local one... no clients, no troubles with the settings and all this is
https://losst.ru/podklyuchenie-i-nastrojka-sshfs-v...

D
Drno, 2022-04-02
@Drno

well, nothing prevents you from uploading files via sFTP,
go to the server via ssh and issue 1 command with the necessary rights to the folder

A
AUser0, 2022-04-02
@AUser0

1. Archive the folder with files in ZIP/TAR+GZIP.
2. Install the lrzsz package on the host.
3. SSH into the host with an SSH client that supports xmodem/ymodem/zmodem file transfer.
4. To transfer via the zmodem protocol, give a command rz- a window for selecting a file to transfer should appear - choose - wait for the transfer to finish ... Then, of course, unarchive, copy where necessary, assign the owner and access rights, etc.
5. It seems to be PROFIT!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question