Ubuntu how to FTP transfer files to folder /var/www

Ubuntuwebserver

I'm new to linux and I've set up a web server with Ubuntu Desktop edition so I can practice with the GUI a bit before transitioning to Ubuntu Server.

I've already set up a LAMP stack as well as FTP. Now I just need to know how to transfer my web files to the /var/www folder in Ubuntu. Previously I've worked on Mac OS and there's a central server for all the web files where I can FTP to.

Now after I've managed to connect via FTP to the Ubuntu server, I see all the folders such as Desktop, Downloads, Documents etc but no web folder.

Anyone able to help me understand how do I FTP to the /var/www folder in Ubuntu?

Thanks

Best Answer

You are going to need write access to /var/www, which

sudo adduser LOGIN_ID www-data
sudo chmod g+rwX -R /var/www

will establish. Next thing would be to create a shortcut in your home directory:

sudo ln -s /var/www /home/LOGIN_ID/

After connecting with the FTP server you should now see the www folder alongside the Desktop folder.

Related Question