Find the answer to your Linux question:
Results 1 to 3 of 3
I cannot mkdir as root please see below Code: [root@vm1 ~]# mkdir /home/vm1/Desktop/nfs mkdir: cannot create directory `/home/vm1/Desktop/nfs': Permission denied so i checked the selinux context below and got Code: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2013
    Posts
    9

    can't run mkdir even as root please help


    I cannot mkdir as root
    please see below

    Code:
    [root@vm1 ~]# mkdir /home/vm1/Desktop/nfs
    mkdir: cannot create directory `/home/vm1/Desktop/nfs': Permission denied
    so i checked the selinux context below and got

    Code:
    [root@vm1 ~]# ls -Z /home/vm1
    drwxrwxrwx. root root system_u:object_r:autofs_t:s0    Desktop
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Documents
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Downloads
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:audio_home_t:s0 Music
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Pictures
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Public
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Templates
    drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Videos

    Can someone tell me what is wrong here?
    And yes i was trying to mount nfs using autofs at some point and wasn't running so seeing autofs there is confusing me..maybe it caused a problem somewhere...


    also after the autofs problem i noticed the whole folders and files in /home/vm1/Desktop are all gone.

    Please what happened?

    Thanks

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Code:
     /home/vm1/Desktop/nfs
    Are you trying to create directory inside nfs mount point ? If so, have you provided write permission in NFS server's /etc/exports file ?

    Here's my nfs export

    Code:
    $ cat /etc/exports
    /home/laks/onefs *(rw,no_root_squash)
    And also post your output of command

    Code:
    mount -a
    Code:
    df -h
    Last edited by Lakshmipathi; 05-03-2013 at 10:25 AM.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Please see this thread as reference to the OP's problem.

Posting Permissions

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