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

Thread: Permission denied in /usr/src

  1. #1
    Join Date
    Sep 2011
    Beans
    21

    Permission denied in /usr/src

    Hey guys,

    I just downloaded drivers for a printer and they came in the tar.gz file type. I tried extracting the file from the archive manager into the /usr/src file but it says i do not have permission to extract it into that folder. I assume that is the folder where i should be storing my tar.gz files? please help

    Nick

  2. #2
    Join Date
    Feb 2008
    Beans
    5,636

    Re: Permission denied in /usr/src

    Extract the archive somewhere in your home folder.
    Navigate into the extracted folder and see if there is a text files with directions about how to install the drivers.
    If not, issue these commands (while in a terminal in the extracted folder):
    Code:
    ./configure
    make
    sudo make install

  3. #3
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,211
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Permission denied in /usr/src

    Run this in terminal:
    Code:
    sudo chown username:username /usr/src
    That will make you the owner of the file and allow you to modify it's contents without admin privileges. And no, there is no folder where you have to store source code. Any place will do. I store mine in /usr/local/src/. It really doesn't matter. Not that it's always a good practice to have on folder where you keep all the code, just for simplicity's sake.

    EDIT: As noted by Teo, you can extract to you home directory also. Like I said, it doesn't matter as long as you know where it is.
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

  4. #4
    Join Date
    Sep 2011
    Beans
    21

    Re: Permission denied in /usr/src

    thanks! went ahead and put it in the /usr/local/src folder which worked perfectly

  5. #5
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,211
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Permission denied in /usr/src

    Quote Originally Posted by nksjolinder View Post
    thanks! went ahead and put it in the /usr/local/src folder which worked perfectly
    Awesome! Mark as solved please.
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

  6. #6
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Permission denied in /usr/src

    Quote Originally Posted by dniMretsaM View Post
    Run this in terminal:
    Code:
    sudo chown username:username /usr/src
    Nooooooo!

    /usr/src is a system directory. You should not change the owner from root for security reasons.

    Please undo it with
    Code:
    sudo chown root:root /usr/src
    If you need to copy files to a system directory, use the copy command:
    Code:
    sudo cp [files to copy] /usr/src/[folder]
    However, why have you not tried the answer in post #2?
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  7. #7
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,211
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Permission denied in /usr/src

    Quote Originally Posted by Paddy Landau View Post
    Nooooooo!

    /usr/src is a system directory. You should not change the owner from root for security reasons.

    Please undo it with
    Code:
    sudo chown root:root /usr/src
    If you need to copy files to a system directory, use the copy command:
    Code:
    sudo cp [files to copy] /usr/src/[folder]
    However, why have you not tried the answer in post #2?
    Ok, now you've confused me. Why shouldn't he change the owner of usr/src/? What does that have to do with security?

    Anyway, he said he put it in /usr/local/src/.
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

  8. #8
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Permission denied in /usr/src

    Quote Originally Posted by dniMretsaM View Post
    Ok, now you've confused me. Why shouldn't he change the owner of usr/src/? What does that have to do with security?

    Anyway, he said he put it in /usr/local/src/.
    Linux's security depends on a certain model. Remember that, unlike Windows, Linux is designed from the ground up to be a multi-user system; more than one person can sign in at the same time to a Linux computer (albeit that it is unusual to use this feature apart from "switch user").

    System files belong to root, and should stay that way.

    One side effect is that it prevents malware from changing system files. Should malware get onto your system, it is because you downloaded and ran it; the worst it can do (unless you supply your password) is damage your files. It cannot mess up the system files or programs, and cannot damage the files of any other user on the computer.

    In fact, if you run as a non-administrator (which is the recommended method), even supplying your password cannot let the malware damage anything other than your own files.

    I'm sure others could add to what I say, but telling someone to change the owner of a system directory goes against the Linux security model and probably against the code of conduct on the Ubuntu Forums.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  9. #9
    Join Date
    Feb 2008
    Beans
    5,636

    Re: Permission denied in /usr/src

    Quote Originally Posted by dniMretsaM View Post
    Ok, now you've confused me. Why shouldn't he change the owner of usr/src/? What does that have to do with security?

    Anyway, he said he put it in /usr/local/src/.
    The /usr/src folder contains the linux headers and source code of the kernel.
    Since the system compiles the kernel from there, it IS a security breach to change the ownership to anything other than root.

  10. #10
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,211
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Permission denied in /usr/src

    Quote Originally Posted by TeoBigusGeekus View Post
    The /usr/src folder contains the linux headers and source code of the kernel.
    Since the system compiles the kernel from there, it IS a security breach to change the ownership to anything other than root.
    Oh I didn't know that. Thanks for the info.
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •