AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Getting permission denied for root

  • 1.  Getting permission denied for root

    Posted Fri October 30, 2015 12:51 PM

    Originally posted by: GDXH_Vivek_Katakam


    Hi All,

    I am using a NFS mounted drive. The user and group have read and write access, I am able to read/write with user and group.

    But when trying to create a file or folder with root access it is giving permission.

    bash-4.3#ls -al

    total 144

    drwxrwxr-x 3 bld bldgroup  4096 Oct 25 10:59 .

    drwxrwxr-x 8 bld   bldgroup  4096 Oct 24 12:23 ..

    In this directory as root if I try a create a file I am getting Permission denied.

    bash-4.3# touch  1
    touch: 1 cannot create

    The directory is nfs mounted directory. The root user is treated as other user in this directory. The same directory I am able to create from Linux system as root.

    I tried to add root user to bldgroup, but of no avail.

    I want read/write access for root without giving 777 permissions

    Thanks and Regards,

    Vivek

     

     

     



  • 2.  Re: Getting permission denied for root

    Posted Sun November 01, 2015 12:16 PM

    Originally posted by: Wouter Liefting


    Most likely the NFS server does "root squashing". This means that if an NFS client performs an NFS request with UID 0 (root), it gets automatically mapped by the server to the nobody account (typically UID -1, -2 or some very high number).

     

    To prevent root squashing, in Linux, add "no_squash" to the /etc/exports file on the NFS server.

    In AIX, use smitty nfs to modify the exported directory options. I don't have an AIX system to hand right now but once you're there it's pretty obvious: There is an option to identify clients that can have "root access". Your NFS client should be listed there. Only for these clients no root squashing takes place. Or you can alter the file /etc/exports manually. There should be an option "root=<hostname>" on the line describing the export.

     

    https://www-01.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.networkcomm/nfs_files_exports.htm



  • 3.  Re: Getting permission denied for root

    Posted Thu November 05, 2015 06:11 AM

    Originally posted by: fiaz54


    Make entry in /etc/exports file .

    some example :

    /apps -access=lpar1,root=lpar1             <=======export to that server and root access is also possible from there