greenhorn alert - command line - imagine that

Discussion in 'Command Line' started by timberbeast, Jul 14, 2013.

  1. timberbeast

    timberbeast New Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    Go ahead and laugh. I need to change the permissions for a directory. I installed a epub manager (calibre) and made another folder to move books out of the download folder. It makes easier to keep track which ones I have imported into the program.

    I did the ls -l thing and can see the directory, and see that is owned by root, and that is not surprising, since I made it since I was still as root installing the program. Dumb, I know. And, I did the su thing and typed in the password, so I thought I was ready to go.

    But I'm doing something wrong because it gives me 'no such directory' when I try to cd to it and change the permissions. And I can see the directory right in front of my face. I tried to follow your instructions in the tutorial to chown it, Rob, but I guess not well enough. It will be funny later, but I am missing something here.

    Yes, it is my own very first Linux. Mint 15. And, I very much like it. It will not be very not long before I use that other drive that has winblows on it for something else.

    Thanks, Larry

    DevynCJohnson likes this.
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,226
    Likes Received:
    413
    Trophy Points:
    83
    No one is going to laugh. We have all made this kind of mistake before. Now, to change file permissions in Linux.
    1. the preferred method is discussed here:
    http://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions
    2. My preferred method is using chown:
    Code:
    sudo chown -R username /path/to/folder
    P.S. You can't change to the directory because you don't have read permissions. Change to the directory as root and I bet it is there. :)
    Rob likes this.
  3. timberbeast

    timberbeast New Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
  4. timberbeast

    timberbeast New Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    Thanks ryanvade, that worked like a champ. I have another question though. I assume that the -R removed the root ownership of the directory and gave it back to me. I see now with ls that instead of root root, it says larry root in the columns. If I knew how to paste a screenshot I would show you. Does that give me the ownership and root is in the group? Something like that?

    I'm not bitchin'. It works just like I want it to.:cool: In the GUI, the lock went away from the directory, that is what I wanted. I'm just curious.

    thanks
    larry
  5. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,226
    Likes Received:
    413
    Trophy Points:
    83
    Yes. if you got "larry root" then larry is the User who owns the file and root is the User group. If you don't like having the root User group owning the file, you can use something like this as root:
    Code:
    chown username:usergroup somefile
    http://www.tuxfiles.org/linuxhelp/fileowner.html
  6. timberbeast

    timberbeast New Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    You are the man. That got it. Way cool! It didn't work until I remembered to use the path to the directory. Duh

    I know my around winblows some, since win 3.1 and DOS 6.22 days, but this is all very new to me. I'll get it.;)

    thanks,
    larry
  7. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,226
    Likes Received:
    413
    Trophy Points:
    83
    Glad it worked.

    You may want to take a look around the tutorials too. :D Lots of important information.
    Primit1v3 likes this.

Share This Page