On LinuxÂ systems, it is very easy to copy the files from one computer to another with the secure copy protocol.
Suppose you are logged into the server with SSH and you want to copy the file: /home/user/dummy.txt from the current server folder to your local path: /var/dummy.txt
Do the following steps:
- Exit from the ssh connection.
- Make sure that you are logged into your local machine.
- Execute the following command withÂ the remote computer’s username and host name:
scp username@hostname:/home/user/dummy.txt /var/dummy.txt
- You will be promptedÂ for the password to connect with the server. Type the password to execute the secure copy operation.
- Your file from the remote server is nowÂ copied successfully to the local system. Make sure that the file is copied at the location /var/dummy.txt.
It is common to see errors like: “permission denied”, that you can see in your applications after uploading the code to your LinuxÂ server. You can simply change many of these errors by providing the properÂ permissions to apache running on your server.
To change the apache running user, execute the below command and open the file with vim:
sudo vim /etc/apache2/envvars
Look through the file contents and modify the lines which resemblesÂ like:
Replace the “www-data” in the first line to your username and for second line, replace with your user’s group name.
Save the file with VIM commands. For more details about VIM commands, please click here.
Restart the server by executing the following command:
sudo service apache2 restart
Now, you can see that your application will run without permission errors.
Note: The whole article is written by assuming that you uploaded all your files to a user owned folder.
There are many ways to install FTP for Linux server, but there is a preferred way to install FTP on Ubuntu servers.
FTP works on a client/server model which transfers file’s data in between as File Transfer Protocol (FTP). The server component in Linux is called an FTP daemon. The FTP helps us to transfer files from the client system to the server. The FTP also can be secured like HTTPS, which will transfer files through the network in a more secure way.
Access to an FTP server can be in two ways:Â Anonymous and Authenticated.Â In the Anonymous mode, clients can access the FTP server by using the default user account called “anonymous”. In the Authenticated mode a user must have an account and a password. Continue reading Install FTP for your Dedicated or Cloud Ubuntu Server