Access home directory on Linux from macOS over NFS

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I want to mount directories on my Raspberry Pi running Raspbian Stretch and access on macOS using nfs.



/etc/exports on the Pi contains



/home/pi *(rw,sync,no_subtree_check)


I can successfully mount the share on macOS with



sudo mount -t nfs -o resvport,rw IP:/home/pi mountpoint


This mounts the files as user 1000, and I can access the files, but not write or delete.



sudo mount -t nfs -o noowners,resvport,rw IP:/home/pi mountpoint


Mounts the files as current macOS user, but I still can't write or delete.



The uid of the macOS user is 501.
Ideally I would like to configure the system to allow my Mac user to have equivalent access to the pi user, without opening the whole home directory to all.







share|improve this question




















  • Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
    – Mark Plotnick
    Oct 15 '17 at 10:42














up vote
0
down vote

favorite












I want to mount directories on my Raspberry Pi running Raspbian Stretch and access on macOS using nfs.



/etc/exports on the Pi contains



/home/pi *(rw,sync,no_subtree_check)


I can successfully mount the share on macOS with



sudo mount -t nfs -o resvport,rw IP:/home/pi mountpoint


This mounts the files as user 1000, and I can access the files, but not write or delete.



sudo mount -t nfs -o noowners,resvport,rw IP:/home/pi mountpoint


Mounts the files as current macOS user, but I still can't write or delete.



The uid of the macOS user is 501.
Ideally I would like to configure the system to allow my Mac user to have equivalent access to the pi user, without opening the whole home directory to all.







share|improve this question




















  • Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
    – Mark Plotnick
    Oct 15 '17 at 10:42












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to mount directories on my Raspberry Pi running Raspbian Stretch and access on macOS using nfs.



/etc/exports on the Pi contains



/home/pi *(rw,sync,no_subtree_check)


I can successfully mount the share on macOS with



sudo mount -t nfs -o resvport,rw IP:/home/pi mountpoint


This mounts the files as user 1000, and I can access the files, but not write or delete.



sudo mount -t nfs -o noowners,resvport,rw IP:/home/pi mountpoint


Mounts the files as current macOS user, but I still can't write or delete.



The uid of the macOS user is 501.
Ideally I would like to configure the system to allow my Mac user to have equivalent access to the pi user, without opening the whole home directory to all.







share|improve this question












I want to mount directories on my Raspberry Pi running Raspbian Stretch and access on macOS using nfs.



/etc/exports on the Pi contains



/home/pi *(rw,sync,no_subtree_check)


I can successfully mount the share on macOS with



sudo mount -t nfs -o resvport,rw IP:/home/pi mountpoint


This mounts the files as user 1000, and I can access the files, but not write or delete.



sudo mount -t nfs -o noowners,resvport,rw IP:/home/pi mountpoint


Mounts the files as current macOS user, but I still can't write or delete.



The uid of the macOS user is 501.
Ideally I would like to configure the system to allow my Mac user to have equivalent access to the pi user, without opening the whole home directory to all.









share|improve this question











share|improve this question




share|improve this question










asked Oct 15 '17 at 2:39









Milliways

532619




532619











  • Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
    – Mark Plotnick
    Oct 15 '17 at 10:42
















  • Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
    – Mark Plotnick
    Oct 15 '17 at 10:42















Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
– Mark Plotnick
Oct 15 '17 at 10:42




Can you run NFS v4 on each system? That will let you specify ID mapping on the NFS server.
– Mark Plotnick
Oct 15 '17 at 10:42










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Thanks to the hint by Mark Plotnick, reading the very confusing man pages and lots of experimentation I finally got it to work using the following in /etc/exports



/home/pi *(rw,sync,no_subtree_check)
/home/pi zaphod.local(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)


zaphod.local is my Mac, and this maps the uid and gid to those of the pi user.



Other pi users have their normal access, but any others can only read files.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398189%2faccess-home-directory-on-linux-from-macos-over-nfs%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    Thanks to the hint by Mark Plotnick, reading the very confusing man pages and lots of experimentation I finally got it to work using the following in /etc/exports



    /home/pi *(rw,sync,no_subtree_check)
    /home/pi zaphod.local(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)


    zaphod.local is my Mac, and this maps the uid and gid to those of the pi user.



    Other pi users have their normal access, but any others can only read files.






    share|improve this answer
























      up vote
      1
      down vote



      accepted










      Thanks to the hint by Mark Plotnick, reading the very confusing man pages and lots of experimentation I finally got it to work using the following in /etc/exports



      /home/pi *(rw,sync,no_subtree_check)
      /home/pi zaphod.local(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)


      zaphod.local is my Mac, and this maps the uid and gid to those of the pi user.



      Other pi users have their normal access, but any others can only read files.






      share|improve this answer






















        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Thanks to the hint by Mark Plotnick, reading the very confusing man pages and lots of experimentation I finally got it to work using the following in /etc/exports



        /home/pi *(rw,sync,no_subtree_check)
        /home/pi zaphod.local(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)


        zaphod.local is my Mac, and this maps the uid and gid to those of the pi user.



        Other pi users have their normal access, but any others can only read files.






        share|improve this answer












        Thanks to the hint by Mark Plotnick, reading the very confusing man pages and lots of experimentation I finally got it to work using the following in /etc/exports



        /home/pi *(rw,sync,no_subtree_check)
        /home/pi zaphod.local(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000)


        zaphod.local is my Mac, and this maps the uid and gid to those of the pi user.



        Other pi users have their normal access, but any others can only read files.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 17 '17 at 4:29









        Milliways

        532619




        532619



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398189%2faccess-home-directory-on-linux-from-macos-over-nfs%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay