Results 1 to 6 of 6
  1. #1

    SFTP to server NOT using root

    Ok, direct root logon to a server is disabled; using another login, obviously. However, I need to be able to SFTP files from my computer to a directory on the server using said login - yet it does not have correct permissions, evidently, and therefore can't even see the directory I need to be able to SFTP files to.

    Tried CHOWNing the directory with that usename, giving it 777 permissions, etc. Doesn't work. Any ideas?

  2. #2
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    12
    Have you checked the permissions for the parent directory of your directory? If you cannot see the directory you are looking at probably the parent directory is not allowing it, eg.
    /a/b/c/d -> d is the direcotry you want to work with and c does not allow you to see any file in it.
    What is showing:
    ls -ld /a/b/c/d
    ls -ld /a/b/c

    But it is not a good idea to change a directory permission to world-wide readable. Depending on the directory you should include the user in the group owning the directory or work with ACL.
    There's only one way of life and that's your own!

  3. #3
    Join Date
    Nov 2006
    Location
    Karachi, Pakistan
    Posts
    1,349
    Move it to a directory you can access and then ssh in, su to root and move the files to correct location.

  4. #4
    Join Date
    Mar 2008
    Posts
    1,717
    I would suggest you stop, and read up on UNIX-style permissions and actually figure out where the issue is, rather than going around giving everyone that ever ends up with so much as a process on your machine access to everything.

    For starters, Drolli's answer could be correct. You could also (though I'm not sure of any system that does it for you without you asking) be in a jailed SFTP server.

    Shell in as the user, then start checking permissions up the directory tree until you figure out why you can't access it. Then correct that permission in the most conservative way possible.

    I hate the knee-jerk reaction of people to chmod 777 something at the first sign of a permissions problem - why not just chmod -R 777 / and avoid permissions issues all together?
    I used to run the oldest commercial Mumble host.

  5. #5
    Join Date
    Jan 2001
    Location
    Miami, FL
    Posts
    1,072
    Quote Originally Posted by Website themes View Post
    Move it to a directory you can access and then ssh in, su to root and move the files to correct location.
    I would agree with this comment.
    Biznesshosting, Inc. DBA VOLICO - Intelligent Hosting Solutions
    East Coast Enterprise Dedicated Servers and Miami Colocation.
    managed and unmanaged dedicated servers. High bandwidth colocation. Managed clusters.

  6. #6
    Quote Originally Posted by fwaggle View Post
    I would suggest you stop, and read up on UNIX-style permissions and actually figure out where the issue is, rather than going around giving everyone that ever ends up with so much as a process on your machine access to everything.

    For starters, Drolli's answer could be correct. You could also (though I'm not sure of any system that does it for you without you asking) be in a jailed SFTP server.

    Shell in as the user, then start checking permissions up the directory tree until you figure out why you can't access it. Then correct that permission in the most conservative way possible.

    I hate the knee-jerk reaction of people to chmod 777 something at the first sign of a permissions problem - why not just chmod -R 777 / and avoid permissions issues all together?
    You're making assumptions. I said I tried that...I did NOT say I LEFT permissions like that. I executed the command to see if that did help. Did not, so I changed permissions back. Next time, ask what I specifically did instead of assuming.

    As it turns out I could do it using Website theme's suggestion. Thanks.

Similar Threads

  1. Replies: 127
    Last Post: 11-19-2009, 11:31 AM
  2. SFTP is not working no VPS server
    By crazyaboutlinux in forum Hosting Security and Technology
    Replies: 13
    Last Post: 07-28-2009, 09:00 PM
  3. Are chained root ssl certificates more secure than single root?
    By evOwl in forum Hosting Security and Technology
    Replies: 0
    Last Post: 11-25-2008, 01:56 PM
  4. Replies: 3
    Last Post: 09-29-2006, 02:02 AM
  5. Replies: 53
    Last Post: 02-11-2003, 01:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •