What is/How to create a UID/GID File











up vote
0
down vote

favorite
3












I've started creating dynamic sshfs mounts to other devices on my local network, but the equivalent users which are the same, have different UIDs/GIDs.



From what I've found whilst searching for a solution I need to add -o idmap=file -o uidfile=/mnt/pcfixe_uid_file -o gidfile=/mnt/pcfixe_gid_file to force how the mount should be owned.



What I can't do, is find out what one of these files is or how it is formatted. Can someone provide an example or point to an appropriate resource that does so.



For example, the device that I am running SSHFS on is UID=1000,GID=1000. The device to which I'm connecting is UID=1001,GID=1007. How do I 'send' the 1001/1007 so it owns the share on the other device's side.



BACKGROUND:
I have several small (Raspberry Pi) transmission servers, I move any files under Torrents not in Complete, Incomplete or Incoming, into Complete. This happens on the Transmission server. I then connect to each of the Transmission servers from a main file server to pull all files from Torrents/Complete to a central repository.



As the equivalent users across the servers do not have matching uids/gids I need to be able to force them to be/appear to be a specific uid/gid depending on which server I'm pulling from.










share|improve this question
























  • There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
    – roaima
    May 20 at 21:12










  • Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
    – aSystemOverload
    May 20 at 21:20










  • Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
    – roaima
    May 20 at 21:47












  • rsync already operates over ssh natively.
    – Ignacio Vazquez-Abrams
    May 20 at 21:49










  • Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
    – roaima
    May 20 at 21:50

















up vote
0
down vote

favorite
3












I've started creating dynamic sshfs mounts to other devices on my local network, but the equivalent users which are the same, have different UIDs/GIDs.



From what I've found whilst searching for a solution I need to add -o idmap=file -o uidfile=/mnt/pcfixe_uid_file -o gidfile=/mnt/pcfixe_gid_file to force how the mount should be owned.



What I can't do, is find out what one of these files is or how it is formatted. Can someone provide an example or point to an appropriate resource that does so.



For example, the device that I am running SSHFS on is UID=1000,GID=1000. The device to which I'm connecting is UID=1001,GID=1007. How do I 'send' the 1001/1007 so it owns the share on the other device's side.



BACKGROUND:
I have several small (Raspberry Pi) transmission servers, I move any files under Torrents not in Complete, Incomplete or Incoming, into Complete. This happens on the Transmission server. I then connect to each of the Transmission servers from a main file server to pull all files from Torrents/Complete to a central repository.



As the equivalent users across the servers do not have matching uids/gids I need to be able to force them to be/appear to be a specific uid/gid depending on which server I'm pulling from.










share|improve this question
























  • There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
    – roaima
    May 20 at 21:12










  • Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
    – aSystemOverload
    May 20 at 21:20










  • Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
    – roaima
    May 20 at 21:47












  • rsync already operates over ssh natively.
    – Ignacio Vazquez-Abrams
    May 20 at 21:49










  • Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
    – roaima
    May 20 at 21:50















up vote
0
down vote

favorite
3









up vote
0
down vote

favorite
3






3





I've started creating dynamic sshfs mounts to other devices on my local network, but the equivalent users which are the same, have different UIDs/GIDs.



From what I've found whilst searching for a solution I need to add -o idmap=file -o uidfile=/mnt/pcfixe_uid_file -o gidfile=/mnt/pcfixe_gid_file to force how the mount should be owned.



What I can't do, is find out what one of these files is or how it is formatted. Can someone provide an example or point to an appropriate resource that does so.



For example, the device that I am running SSHFS on is UID=1000,GID=1000. The device to which I'm connecting is UID=1001,GID=1007. How do I 'send' the 1001/1007 so it owns the share on the other device's side.



BACKGROUND:
I have several small (Raspberry Pi) transmission servers, I move any files under Torrents not in Complete, Incomplete or Incoming, into Complete. This happens on the Transmission server. I then connect to each of the Transmission servers from a main file server to pull all files from Torrents/Complete to a central repository.



As the equivalent users across the servers do not have matching uids/gids I need to be able to force them to be/appear to be a specific uid/gid depending on which server I'm pulling from.










share|improve this question















I've started creating dynamic sshfs mounts to other devices on my local network, but the equivalent users which are the same, have different UIDs/GIDs.



From what I've found whilst searching for a solution I need to add -o idmap=file -o uidfile=/mnt/pcfixe_uid_file -o gidfile=/mnt/pcfixe_gid_file to force how the mount should be owned.



What I can't do, is find out what one of these files is or how it is formatted. Can someone provide an example or point to an appropriate resource that does so.



For example, the device that I am running SSHFS on is UID=1000,GID=1000. The device to which I'm connecting is UID=1001,GID=1007. How do I 'send' the 1001/1007 so it owns the share on the other device's side.



BACKGROUND:
I have several small (Raspberry Pi) transmission servers, I move any files under Torrents not in Complete, Incomplete or Incoming, into Complete. This happens on the Transmission server. I then connect to each of the Transmission servers from a main file server to pull all files from Torrents/Complete to a central repository.



As the equivalent users across the servers do not have matching uids/gids I need to be able to force them to be/appear to be a specific uid/gid depending on which server I'm pulling from.







sshfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 20 at 21:53

























asked May 20 at 20:55









aSystemOverload

322315




322315












  • There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
    – roaima
    May 20 at 21:12










  • Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
    – aSystemOverload
    May 20 at 21:20










  • Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
    – roaima
    May 20 at 21:47












  • rsync already operates over ssh natively.
    – Ignacio Vazquez-Abrams
    May 20 at 21:49










  • Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
    – roaima
    May 20 at 21:50




















  • There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
    – roaima
    May 20 at 21:12










  • Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
    – aSystemOverload
    May 20 at 21:20










  • Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
    – roaima
    May 20 at 21:47












  • rsync already operates over ssh natively.
    – Ignacio Vazquez-Abrams
    May 20 at 21:49










  • Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
    – roaima
    May 20 at 21:50


















There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
– roaima
May 20 at 21:12




There may be better options than SSHFS. (Not necessarily, but possibly.) Would you want to consider those?
– roaima
May 20 at 21:12












Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
– aSystemOverload
May 20 at 21:20




Totally, my overall goal is to dynamically create a link to other devices and then perform various commands, incl. RSync on various locations on the remote device.
– aSystemOverload
May 20 at 21:20












Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
– roaima
May 20 at 21:47






Your comment sounds like marketing-speak. By the way, rsync across sshfs will be desperately inefficient.
– roaima
May 20 at 21:47














rsync already operates over ssh natively.
– Ignacio Vazquez-Abrams
May 20 at 21:49




rsync already operates over ssh natively.
– Ignacio Vazquez-Abrams
May 20 at 21:49












Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
– roaima
May 20 at 21:50






Exactly right, @IgnacioVazquez-Abrams. But I've seen people try it...
– roaima
May 20 at 21:50












1 Answer
1






active

oldest

votes

















up vote
0
down vote













The format of the uid and gid mapping files seems to consist of lines of the form:
name:id where name is a user/group name on the client and id is a uid/gid on the server - e.g. graham:1002.



If you want several local users to be able to access the mount then you have to make sure that user_allow_other is set (i.e. uncommented) in /etc/fuse.conf.






share|improve this answer








New contributor




Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















    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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f445029%2fwhat-is-how-to-create-a-uid-gid-file%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    The format of the uid and gid mapping files seems to consist of lines of the form:
    name:id where name is a user/group name on the client and id is a uid/gid on the server - e.g. graham:1002.



    If you want several local users to be able to access the mount then you have to make sure that user_allow_other is set (i.e. uncommented) in /etc/fuse.conf.






    share|improve this answer








    New contributor




    Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote













      The format of the uid and gid mapping files seems to consist of lines of the form:
      name:id where name is a user/group name on the client and id is a uid/gid on the server - e.g. graham:1002.



      If you want several local users to be able to access the mount then you have to make sure that user_allow_other is set (i.e. uncommented) in /etc/fuse.conf.






      share|improve this answer








      New contributor




      Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        up vote
        0
        down vote










        up vote
        0
        down vote









        The format of the uid and gid mapping files seems to consist of lines of the form:
        name:id where name is a user/group name on the client and id is a uid/gid on the server - e.g. graham:1002.



        If you want several local users to be able to access the mount then you have to make sure that user_allow_other is set (i.e. uncommented) in /etc/fuse.conf.






        share|improve this answer








        New contributor




        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        The format of the uid and gid mapping files seems to consist of lines of the form:
        name:id where name is a user/group name on the client and id is a uid/gid on the server - e.g. graham:1002.



        If you want several local users to be able to access the mount then you have to make sure that user_allow_other is set (i.e. uncommented) in /etc/fuse.conf.







        share|improve this answer








        New contributor




        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Nov 21 at 16:57









        Graham Knight

        1




        1




        New contributor




        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Graham Knight is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f445029%2fwhat-is-how-to-create-a-uid-gid-file%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Entries order in /etc/network/interfaces

            新発田市

            Grub takes very long (several minutes) to open Menu (in Multi-Boot-System)