Cannot add files on the server

February 15, 2013 7.4k views
Hi, i just delete my droplet and rebuilt a new one. I can connect to the server with FileZilla using SFTP and i have access to the folder /var/www and i can see the index.html and the info.php files. The problem is i cannot add any files in /var/www when i drag files Filezilla tell me "Impossible to start the transfert" ??? Strange cause i access the server. But i also see that when y try to access the FTP by the browser (ftp://myIP) i have an error 101 and if i try by Putty with FTP myIP it say connection refused. ??? So how it is possible that i can connect to the server but i cannot add files and cannot connet directly by browser or Putty ????????? Any help will be appreciate. Regards
8 Answers
OK, i just understand that i have to add a FTP server. I'm really newbie on this :)
No you dont. SFTP works right out of the box.
All you need is SFTP, Port 22 open (should be by default), and the root password (with root as the username) and you should be able to log-in without installing an FTP server.

Hostname = IP Address

Username = root

Password = root password

Protocol = SFTP

That should allow you in using any FTP program such as FileZilla.
If the folder you're trying to upload the file in, is not owned by the user that you logged in with Filezilla (presumably root), then it won't work. Neither will live-editing a file not owned by root.
Getting FTP to work is a pain!! I tried VSFTPd and ProFTPD and none worked according to Digital Ocean Tutorial. First of all they don't explain how to connect, which port, etc.
I also have an issue here. I can access the sftp with root user. But if I add a test index.html in the www/html folder in browser it does not work. noobhere, any help is welcome. Thank you.
@fere_tzau You shouldn't connect to SFTP as root - it's a bad habit security-wise. Create a user (https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04) and login via SFTP as that user.
Try this:

# sudo chown -R root:root /var/www

# sudo chmod -R 755 /var/www

# sudo /etc/init.d/apache2 restart

Then let us know how it goes
Have another answer? Share your knowledge.