Results 1 to 4 of 4

Thread: how to give me "permissions"

  1. #1
    Join Date
    Jun 2009
    Beans
    70

    Exclamation how to give me "permissions"

    ok im trying to set something up through the terminal but i get an error when it tries to create a file its restricted:

    error: could not create '/usr/local/lib/python2.6/dist-packages/msnp': Permission denied

    how can i enable these permissions?

  2. #2
    Join Date
    Jun 2009
    Location
    Indiana
    Beans
    56
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how to give me "permissions"

    sudo then the commands.

    Google
    is your best friend

  3. #3
    Join Date
    Jun 2009
    Beans
    70

    Re: how to give me "permissions"

    you would think i know that by now... lol thanks!

  4. #4
    Join Date
    May 2007
    Beans
    853
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how to give me "permissions"

    For more clarification, every file has a permissions string that contains 3 digits
    let's call this file foo.txt

    there are 2 (command line) ways you can affect the permissions of foo.txt
    chown
    and
    chmod

    chown changes the owner of a file. you can use it like this
    Code:
    chown user:usergroup foo.txt
    where user is the new owner of the file and usergroup is the group that has access to the file.

    chown usually has to be run with root privileges, so don't forget sudo in front.

    chmod is not hard to understand, but the number system needs to be learned.

    chmod can be used to give read, write and executable permissions to a file.
    exectutable = 1
    write = 2
    read = 4

    for the three digit number ###, the first digit is for the owner, the second is for the group and the third is for everybody else.


    so foo.txt is now owned by user and usergroup, but we want to set specifics. let's say we want full access for the user, read access for the group, and nothing for anyone else. the 3 digit number is a sum of the permissions for each set of people.
    so, 7 (exec+read+write) for the user, 4 (read) for the group, and 0 for everyone else would be done like this
    Code:
    chmod 740 foo.txt
    one last thing. directories need to have executable permissions for somebody to browse through them. so if you want someone to have read only access to a directory, you need to give them a 5.
    The box said that I needed to have Windows 98 or better... so I installed Linux
    Need help with shell commands? click
    Need MORE help with shell commands? advanced click

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
  •