I can access the files on localhost in my FTP programme, but the account is locked, so while I can see them and view localhost in my browser, I can not edit, download or upload any files.

I setup ssh with the following positive results as explained on http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/ before that I couldn't even access localhost in my ftp programme.

ssh localhost
The authenticity of host 'localhost (' can't be established.
ECDSA key fingerprint is ce:12:ab:b4:e6:02:03:de:35:82:22:bd:63:f5:9a:d1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
simon@localhost's password: 
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-27-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

Last login: Sun Jul 14 11:57:29 2013

I tried:

$ scp test.bin simon@server:/tmp

Which results in a timeout


ssh localhost

logs me in with a password.

This learning curve is amazing, I love Ubuntu.

preview options

If anyone has any ideas, could you indulge me and point me in the right direction please?

  • It is a bit unclear what you are asking about. Apparently, you can log in with ssh, so where is the problem? The secure options you are highlighting are for key-based authentication (rather than password-based authentication), but you don't need them if you can log in just with your password. – January Jul 18 '13 at 7:04
  • @January Sorry about that, I have changed the image to that which shows the locked symbol. – SimplySimon Jul 18 '13 at 7:25
  • Now I'm confused (and I don't know your FTP program). Do you want to connect with ssh/sftp or ftp? (those are two very different protocols, and I'd highly recommend sftp). Which one does not work? What does "locked" mean? (there is no such thing; you can view the files, therefore you have logged in; whether you have write permissions is another thing) Why are you logging in as root? – January Jul 18 '13 at 7:29
  • OK I tried logging in as root because the www folder is owned by root it also works the same if I login with simon and my password. The choices I am offered by CrossFTP Pro ha – SimplySimon Jul 18 '13 at 7:41
  • missed the end off Sorry ...ve been added to the question. – SimplySimon Jul 18 '13 at 8:12

OK, there is already way too much for a single comment. Let's untangle the confused discussion. There are two problems here: (i) access and (ii) permissions on the server.

  1. FTP vs SFTP. Although the names are similar and both "things" look very much alike, these two ways of accessing your server are handled by two very different programs.

    • FTP is run by an FTP server; it is both old and simple
    • SFTP on the other hand is run by an SSH server and over an SSH connection. It is more versatile and more secure. You will be well advised to access your web server using SSH/SFTP.
    • you can use SSH both to connect directly to the server, log in and run commands, as well as run SFTP just for transferring the files. Heck, you can even mount the server like a network drive using SSH!
  2. Testing the SFTP connection. If you can log in as simon, you should be able to transfer files to and from /tmp and /home/simon. If this doesn't work with your program, please open a terminal and type

    # create a fake file for testing
    dd if=/dev/zero of=test.bin count=128
    scp test.bin simon@server:/tmp
    scp test.bin simon@server:/home/simon

    If these work (as they should), then your problems are either due to your ftp program, or due to permissions on the server.

  3. Once you are logged in and gained access to the server, but can't modify the files you wish to modify, you might want to log in with ssh first to look around what is happening. Open a terminal, and type

    ssh simon@localserver

    Enter password, log in and try to create and modify files, and look who the files belong to:

    touch /tmp/test
    touch /var/www/test
    ls -l /var/www
| improve this answer | |
  • Thanks for this. When I type in the commands you agve in to the Terminal window, everything stops at scp test.bin simon@server:/tmp – SimplySimon Jul 18 '13 at 9:21
  • I get ssh: connect to host server port 22: Connection timed out lost connection after about 3 minutes – SimplySimon Jul 18 '13 at 9:31
  • Can you do ssh simon@server? If not, maybe you don't have an ssh server enabled on the server side? If not, read unixtutorial.org/2009/05/… – January Jul 18 '13 at 9:53
  • No, the same result: ssh: connect to host localserver port 22: Connection timed out I'll start reading :) – SimplySimon Jul 18 '13 at 10:00
  • I had read this before and followed the instructions to install setup and test the ssh server. It worked then as it does now, but The terminal command scp test.bin simon@server:/tmp and the CrossFTP programme, still do not work. – SimplySimon Jul 18 '13 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.