Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: permission denied for file inside home folder

  1. #1
    Join Date
    Jun 2011
    Location
    AUSTRALIA AUSSIE AUSSIE..
    Beans
    36
    Distro
    Ubuntu 11.04 Natty Narwhal

    permission denied for file inside home folder

    hay guys i was strolling along in the terminal today and copied a folder from my hard drive that was fine now
    The folder i want to open this there "tafe cert4"

    ninjalo161@ninjalo161-Aspire-5742:/home$ ls -a
    . .. ninjalo161 Tafe cert4
    then i do this and get this

    ninjalo161@ninjalo161-Aspire-5742:/home$ cd Tafe\ cert4
    bash: cd: Tafe cert4: Permission denied
    i also tried

    ninjalo161@ninjalo161-Aspire-5742:/home$ sudo cd Tafe\ cert4
    sudo: cd: command not found
    ***UPDATE**
    i looked at the folder in the GUI aswell at i wont let me in the folder it said permission denied maybe it was a but copy or placed in the wrong folder :/

    This is what i have in result to ls command mmm folder dusent look rite ;/ i dont any thing bout linux file permissions but Tafecert4 dusent have many lol

    drwxr-xr-x 4 root root 4096 2011-08-10 10:46 .
    drwxr-xr-x 24 root root 4096 2011-08-10 10:46 ..
    drwxr-xr-x 33 ninjalo161 ninjalo161 4096 2011-08-10 09:41 ninjalo161
    drwx------ 10 root root 4096 2011-08-10 10:27 Tafe cert4

    Thanks
    imortalninja161
    Last edited by imortalninja161; August 10th, 2011 at 02:41 AM.
    i am an Ubuntu nub please be patient and understanding because after all Professor John Atanasoff was once "just learning" to

  2. #2
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: permission denied for file inside home folder

    Try to post the result of this command:

    Code:
    ls -al

  3. #3
    Join Date
    Apr 2009
    Location
    Hyper-Cyberspace
    Beans
    Hidden!
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: permission denied for file inside home folder

    I have a totally graphical cheat that I use to move files around to and from "restricted" folders. I discovered it during my flirtation with the lightning-fast LXDE desktop.

    Using Software manager or Synaptic, install PCManFM. It's LXDE's file manager but for a "lightweight" it packs a punch! Let's say I just downloaded this wicked cool wallpaper and want to add it to my collection. In PCManFM, I copy files from /home/downloads, which is "open," to usr/share/xfce4/backdrops (where Xubuntu keeps my wallpapers), which is a "permission denied" directory. Heh heh, we'll see about that!

    Click on Tools -> Open Current Folder as Root. Enter my password and bingo, a new window opens with a heading, "WARNING! You are in Superuser Mode!"

    Now I can just drag and drop my stuff between folders effortlessly.

    It's a graphical substitute for "sudo" in the terminal. Works for me!

    -Robin

  4. #4
    Join Date
    Dec 2008
    Location
    43° 7' 41" 131° 54' 3"
    Beans
    Hidden!

    Re: permission denied for file inside home folder

    then i do this and get this

    Quote:
    ninjalo161@ninjalo161-Aspire-5742:/home$ cd Tafe\ cert4
    bash: cd: Tafe cert4: Permission denied
    i also tried

    Quote:
    ninjalo161@ninjalo161-Aspire-5742:/home$ sudo cd Tafe\ cert4
    sudo: cd: command not found
    This is not windows....to descend into a directory it is a forward slash "/".
    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

  5. #5
    Join Date
    Sep 2008
    Location
    Godfrey, IL
    Beans
    1,008
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: permission denied for file inside home folder

    Quote Originally Posted by jtarin View Post
    This is not windows....to descend into a directory it is a forward slash "/".
    I don't know about that, jtarin...I tried several experiments, and while it indeed is a forward slash, attempting to use a back slash didn't throw the same error as he's getting.

    When I inserted a back slash, it threw a "No such file or directory", not a "cd: command not found". Of course, it might have something to do with the "sudo" command. I didn't experiment with that, and I don't know whether sudo can be used with cd, but I don't know why not.

    One other way you can access it the GUI way is to launch Nautilus with Super user permissions:

    Code:
    gksudo nautilus
    That way, you should be able to open and navigate the folder.
    73 from Glenn - KG5UC "Mungo just pawn in game of Life"
    Bump Thread Post #39000 - How To Partition

  6. #6
    Join Date
    Jun 2011
    Location
    AUSTRALIA AUSSIE AUSSIE..
    Beans
    36
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: permission denied for file inside home folder

    yerrrr the / is a result of a earlier executed command so in effect it has not relevents to the syntax of this command

    ninjalo161@ninjalo161-Aspire-5742:/home$ #### the command starts at the $ ####### cd Tafe\ cert4
    bash: cd: Tafe cert4: Permission denied

    And no i havent tried the gksudo nautilus yet thank you for the command but i was hoping to resolve the issue in terminal. I am studying linux more specificity redhat as a part of my networking course and our test will all be on using terminal so i am trying to get ustew using terminal to navigate everywhere atm lol.

    Is there a way to add some type of view by everyone or full control permission to that folder threw terminal :/

    thanks
    imortalninja161
    Last edited by imortalninja161; August 10th, 2011 at 09:48 AM.
    i am an Ubuntu nub please be patient and understanding because after all Professor John Atanasoff was once "just learning" to

  7. #7
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: permission denied for file inside home folder

    Quote Originally Posted by jtarin View Post
    This is not windows....to descend into a directory it is a forward slash "/".
    The OP is not using the backslash as a directory separator. They are using it as an escape character because of the space in the folder name, thus:

    Code:
    cd Tafe\ cert4
    That is correct usage.

    @imortalninja161, as far as I can see your problem is straightforward:

    Quote Originally Posted by imortalninja161
    Code:
    drwxr-xr-x 4 root root 4096 2011-08-10 10:46 .
    drwxr-xr-x 24 root root 4096 2011-08-10 10:46 ..
    drwxr-xr-x 33 ninjalo161 ninjalo161 4096 2011-08-10 09:41 ninjalo161
    drwx------ 10 root root 4096 2011-08-10 10:27 Tafe cert4 
    It's not clear from your post how you got that output (what command did you use?), but your "Tafe cert4" is owned by root and only root has rwx permissions. That's why you can't open it. If "Tafe cert4" is in your home folder, do this command.

    Code:
    sudo chown -R ninjalo161: Tafe\ cert4
    The -R option will also change the ownership of any files inside the "Tafe cert4" folder.

    EDIT: that command assumes you are still "in" your home directory in the terminal - that is, that you haven't cd'd anywhere.(end-edit).

    By the way, when posting terminal output, please use [code][/code] tags, not quote tags. You lose important formatting with quote tags.
    Last edited by coffeecat; August 10th, 2011 at 10:12 AM.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  8. #8
    Join Date
    Apr 2010
    Beans
    84
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: permission denied for file inside home folder

    drwx------ 10 root root 4096 2011-08-10 10:27 Tafe cert4
    Your folder name has a space in it hence the back slash \ to escape it in the command (its not a directory delimiter).

    Can also use quotes round the name to avoid confusion e.g cd "Tafe cert4" (Personally i avoid having spaces in directory names as its a pain)

    The "Tafe cert4" folder is owned by root with no access to anyone else, to change it to be owned by yourself do this:

    Code:
     
    sudo chown ninjalo161:ninjalo161 "Tafe cert4"
    (This assumes your user is in group ninjalo161, check this with "id" command to see your main group, if its not ninjalo161 then change the second ninjalo161 in the command to the group your actually in)

    If you want read access to other users, i.e same permission as the ninjalo161 directory, then do this:

    Code:
     
    chmod 755 "Tafe cert4"
    (don't have to sudo this one as you now own the file after the chown command, but would do if it was still owned by root)

    Use man to read up on the chown and chmod commands to see what these are doing and other options. You may need the recursive option (-R) if the directory has futher sub-dirs you need to change as well.

    EDIT: lol, simultaneous reply with coffecat, looks like we are saying the same things though
    Last edited by dethorpe; August 10th, 2011 at 10:21 AM. Reason: duplicate

  9. #9
    Join Date
    Jun 2011
    Location
    AUSTRALIA AUSSIE AUSSIE..
    Beans
    36
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: permission denied for file inside home folder

    Sweeeeeettttt got it Thank you all for you help specially dethorp and cofee cat

    Thanks
    imortalninja161
    i am an Ubuntu nub please be patient and understanding because after all Professor John Atanasoff was once "just learning" to

  10. #10
    Join Date
    Dec 2008
    Location
    43° 7' 41" 131° 54' 3"
    Beans
    Hidden!

    Re: permission denied for file inside home folder

    Quote Originally Posted by coffeecat View Post
    The OP is not using the backslash as a directory separator. They are using it as an escape character because of the space in the folder name, thus:

    Code:
    cd Tafe\ cert4
    That is correct usage.
    I wasn't so certain of that, but now I see. As stated by another...I avoid spaces in filenames (always have out of old habits) and this didn't come to mind at all. I did catch the permissions thing but thought....one thing at a time. Good you got it solved.
    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

Page 1 of 2 12 LastLast

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
  •