Find the answer to your Linux question:
Results 1 to 7 of 7
I am trying to figure out why I am getting permission denied when I try to make a new directory in root. I have made them before ? Linux is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2014
    Posts
    50

    Permission denied to create directory


    I am trying to figure out why I am getting permission denied when I try to make a new directory in root.

    I have made them before ?

    Linux is always an interesting animal.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,556
    Normally, a non-root user cannot create directories in /root. If you have sudo privileges then you should be able to do so.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Mar 2014
    Posts
    50
    I am root using Puppy 5.6.

    I have made directories before, have not figured out why it no longer works.
    I was able to add one using Windows.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,556
    Something may have altered the permissions on /root. You need the -x permission in order to create files/sub-directories there.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Mar 2014
    Posts
    50
    I tried chattr +x but it did not work.

    Is there another command that I should be using ?

    I just got a "permission denied" when trying to install a program.

    I tried to be very, very, careful when using chattr +i, but no telling what I may have done.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,556
    This may explain it, from the chattr manpage:
    Code:
           A file with the ‘i’ attribute cannot be modified: it cannot be deleted or renamed, no link can  be  created  to
           this  file  and  no  data  can  be  written  to  the  file.   Only  the  superuser  or a process possessing the
           CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
    So, you need to clear the "immutable" attribute with "chattr -i /root".
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Mar 2014
    Posts
    50
    Thanks, I figured that out a short time ago.

    Andy

Posting Permissions

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