The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH Permission Denied???

Discussion in 'General Discussion' started by Hines, May 7, 2010.

  1. Hines

    Hines Active Member

    Joined:
    Apr 23, 2010
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    SOLVED!-SSH Permission Denied???

    I maxed out my disk space and need to delete my backups. When i use the "ls" command it returns: "permission denied."

    My backup directory is right off the root: it's " /backup ."

    I've been trying for HOURS to fix this problem. Can someone proficient in linux please tell me what syntax or simple command i need to see my backups so i can delete them?
     
    #1 Hines, May 7, 2010
    Last edited: May 7, 2010
  2. cPanelJamyn

    cPanelJamyn Social Engineer
    Staff Member

    Joined:
    Jan 29, 2009
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    0
    Hi,

    Make sure you're the 'root' user. What does this show? My guess is you're not the root user, and the permissions on /backup are restrictive.

    Code:
    # cd /
    # ls -l /backup
    
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Are you logged into the server as root or as a regular user?

    If you are logged in as a regular user, you probably do not have proper permissions to be able to access the /backup folder.

    If you are logged in as "root" and you are seeing that message then you got serious issues and in that case would sound like you probably tried to "secure" system binaries in /bin and locked down some you shouldn't.

    What does "ls -lad -- /backup" and "df -h" show you?
     
  4. Hines

    Hines Active Member

    Joined:
    Apr 23, 2010
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Thank you, Spiral.

    Issue solved. "su -" did it for me. I'm slowly learning BASH and SSH. You are a great contributor to these foums and I am proud to be a part of the cPanel community!
     
    #4 Hines, May 7, 2010
    Last edited: May 7, 2010
  5. nxweb

    nxweb Active Member

    Joined:
    Oct 29, 2008
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Well kudos to you, you may be learning, but you're already doing the right thing by not using a direct root login :)
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    There is really two sides to that statement and in the simplest context, I certainly agree that inexperienced users (and even experienced ones) shouldn't be using root unless there is an actual legitimate reason.

    Where it comes to server management via SSH though, you are going to be spending more time as root than as a regular user.

    Where it comes to web site management via SSH, you are probably not going to need root most of the time and spend most of the time as a regular user then at root.

    The important thing to remember and keep in mind always is just how easy it is to completely screw yourself over so you must always be extremely careful as one wrong keystroke in root can be total disaster.

    In example (and I don't recommend either in root for obvious reasons):
    Code:
    # rm -Rf ./*
    
    (Remove all the files at or below the current directory location)

    Code:
    # rm -Rf /*
    
    (Remove EVERY FILE on the entire server)

    Forgetting a single period in this instance could be an enormous disaster and yes I have actually seen quite a few server owners make precisely this exact mistake and cost themselves days of downtime rebuilding.

    Moral of the story ---- when in root, be extremely careful! :D
     
Loading...

Share This Page