3

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

1 Answer 1

8

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.

4
  • 1
    I've created the shortcut but when I try to access it via my FTP program, Forklift, I get the following message "The symbolic link "/www" can't be resolved because the original item can't be found."
    – jc.yin
    Jun 30, 2013 at 17:23
  • 1
    Oh actually I've set my program to access SFTP rather than FTP and now it works, perfect answer!
    – jc.yin
    Jun 30, 2013 at 17:27
  • 1
    sudo adduser LOGIN_ID then sudo adduser LOGIN_ID www-data
    – B. Shea
    Aug 27, 2016 at 19:08
  • I'm very new to the command line. When you use LOGIN_ID are you referring to the username used when connecting via FTP or the user account on the computer?
    – www139
    Dec 12, 2016 at 1:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .