Results 1 to 7 of 7

Thread: getting into a directory

  1. #1
    Join Date
    Aug 2008
    Location
    Galveston, Texas
    Beans
    135
    Distro
    Ubuntu 10.04 Lucid Lynx

    getting into a directory

    I am trying to get into a directory on my server, that is owned by root.
    Code:
    drwx------  2 www-data www-data  4096 2010-06-01 17:32 images
    if I type in
    Code:
    cd image/
    I am informed that I don't have permission.

    If I type in
    Code:
    sudo cd image/
    I am informed that
    Code:
    sudo: cd: command not found
    why would this be, and how can I get sudo cd to work?
    Liberty in Life and Freedom in Software.

  2. #2
    Join Date
    Apr 2009
    Location
    Texas
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: getting into a directory

    the command:

    Code:
    cd
    is not a program so you do not "run" it as you would say apt-get or aptitude with

    Code:
    sudo apt-get install
    i would just suggest using

    Code:
    sudo -i
    and editing the directory as needed then run

    Code:
    exit
    to get back to user prompt.
    Last edited by stlsaint; February 6th, 2011 at 09:01 PM.
    Ubuntu Christian Edition chat on irc at server: OFTC/channel: #ubuntuCE
    BootInfoScript DualBooting
    Grub Grub2 MBR/GRUB
    Boot Info Script courtesy of community member meierfra and ghulselmans

  3. #3
    Join Date
    Nov 2007
    Location
    Sweden
    Beans
    2,200

    Re: getting into a directory

    I would recommend you look up: File Manager - Super User Mode and then go into that directory graphically. It would be the easiest thing.

    Otherwise,
    Code:
    man sudo
    to know how you use the command.
    Debian 11 "Bullseye"
    HP Envy 2021 laptop
    Linux user since 1999.

  4. #4
    Join Date
    Mar 2009
    Location
    /home/.basement
    Beans
    122
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: getting into a directory

    You could just try using su instead of sudo. Might be easier.
    Dell Latitude E5530
    Intel i5-3210 @ 2.5GHz
    16gb DDR3-1333
    Samsung 840 Pro with Windows 8 Pro & Ubuntu 12.10

  5. #5
    Join Date
    Aug 2008
    Location
    Galveston, Texas
    Beans
    135
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: getting into a directory

    Thanks all:
    sudo -i
    did the trick.
    su
    Didn't work. It asked for a password, and it wouldn't accept my user password. I assume because I never never created a root password.
    I tried
    sudo su
    and that worked also.

    I didn't realize the the command cd was handled differently than other commands and isn't a real program. I will mark this as solved.
    Liberty in Life and Freedom in Software.

  6. #6
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: getting into a directory

    gksu nautilus
    will open the file manager as root

  7. #7
    Join Date
    Aug 2008
    Location
    Galveston, Texas
    Beans
    135
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: getting into a directory

    Quote Originally Posted by sdowney717 View Post
    gksu nautilus
    will open the file manager as root
    I thought of that, but I'm logged into the server via ssh from my desktop. So I think I'm limited to the command line. and I haven't figured out how to explore my server from the desktop console.
    Yet.
    Liberty in Life and Freedom in Software.

Bookmarks

Posting Permissions

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