Configure udisks permission












1















On my Debian Stretch, my USB drive is auto-mounted on login, AFAICT. It is placed under /media/currentuser/DRIVENAME. I suppose udisks takes care of this (but I could be wrong). No entry in fstab relate to that disk.



I would like other users to have (read and write) access to the drive, and (relatedly) I would like to change its default mount point (which does not make sense if the drive is to be shared accross several users).



I suppose it is possible to do it by adding an entry for that drive in fstab, as often advised. But I would like to know if it is possible to rather configure udisks? I have read that polkit can be used for this, and I suspect it will offer more options and be “more modern” than the fstab way. But I have been unable to find information about how to do this. (For example this answer points to examples which suggest to add polkit rules in the /etc/polkit-1/rules.d/ folder, but this does not exist on my system, which lets me suppose that this advice is somewhat outdated or not applicable to me.)










share|improve this question



























    1















    On my Debian Stretch, my USB drive is auto-mounted on login, AFAICT. It is placed under /media/currentuser/DRIVENAME. I suppose udisks takes care of this (but I could be wrong). No entry in fstab relate to that disk.



    I would like other users to have (read and write) access to the drive, and (relatedly) I would like to change its default mount point (which does not make sense if the drive is to be shared accross several users).



    I suppose it is possible to do it by adding an entry for that drive in fstab, as often advised. But I would like to know if it is possible to rather configure udisks? I have read that polkit can be used for this, and I suspect it will offer more options and be “more modern” than the fstab way. But I have been unable to find information about how to do this. (For example this answer points to examples which suggest to add polkit rules in the /etc/polkit-1/rules.d/ folder, but this does not exist on my system, which lets me suppose that this advice is somewhat outdated or not applicable to me.)










    share|improve this question

























      1












      1








      1


      1






      On my Debian Stretch, my USB drive is auto-mounted on login, AFAICT. It is placed under /media/currentuser/DRIVENAME. I suppose udisks takes care of this (but I could be wrong). No entry in fstab relate to that disk.



      I would like other users to have (read and write) access to the drive, and (relatedly) I would like to change its default mount point (which does not make sense if the drive is to be shared accross several users).



      I suppose it is possible to do it by adding an entry for that drive in fstab, as often advised. But I would like to know if it is possible to rather configure udisks? I have read that polkit can be used for this, and I suspect it will offer more options and be “more modern” than the fstab way. But I have been unable to find information about how to do this. (For example this answer points to examples which suggest to add polkit rules in the /etc/polkit-1/rules.d/ folder, but this does not exist on my system, which lets me suppose that this advice is somewhat outdated or not applicable to me.)










      share|improve this question














      On my Debian Stretch, my USB drive is auto-mounted on login, AFAICT. It is placed under /media/currentuser/DRIVENAME. I suppose udisks takes care of this (but I could be wrong). No entry in fstab relate to that disk.



      I would like other users to have (read and write) access to the drive, and (relatedly) I would like to change its default mount point (which does not make sense if the drive is to be shared accross several users).



      I suppose it is possible to do it by adding an entry for that drive in fstab, as often advised. But I would like to know if it is possible to rather configure udisks? I have read that polkit can be used for this, and I suspect it will offer more options and be “more modern” than the fstab way. But I have been unable to find information about how to do this. (For example this answer points to examples which suggest to add polkit rules in the /etc/polkit-1/rules.d/ folder, but this does not exist on my system, which lets me suppose that this advice is somewhat outdated or not applicable to me.)







      permissions udisks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 4 '18 at 9:01









      Olivier CaillouxOlivier Cailloux

      1486




      1486






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I don't think that polkit is what you're looking for. It allows you to control permissions related to programs and actions on your system but it does not allow you to change the functioning of those programs/actions. If you decide to use polkit for a purpose other than what you're asking about here, the configuration files in Debian/Ubuntu are located at /usr/share/polkit-1.



          You are correct that udisks is taking care of your auto-mounting. Despite what the user in your link states, there is no way to configure udisks as stated in their answer. The example they give shows command line mounting, not a configuration.



          The best way of achieving your goal is indeed to use /etc/fstab. A line such as




          /dev/XXX /media/DRIVENAME auto user,umask=0000 0 0




          will achieve what you're trying to accomplish.





          share























            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',
            autoActivateHeartbeat: false,
            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%2f473174%2fconfigure-udisks-permission%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









            0














            I don't think that polkit is what you're looking for. It allows you to control permissions related to programs and actions on your system but it does not allow you to change the functioning of those programs/actions. If you decide to use polkit for a purpose other than what you're asking about here, the configuration files in Debian/Ubuntu are located at /usr/share/polkit-1.



            You are correct that udisks is taking care of your auto-mounting. Despite what the user in your link states, there is no way to configure udisks as stated in their answer. The example they give shows command line mounting, not a configuration.



            The best way of achieving your goal is indeed to use /etc/fstab. A line such as




            /dev/XXX /media/DRIVENAME auto user,umask=0000 0 0




            will achieve what you're trying to accomplish.





            share




























              0














              I don't think that polkit is what you're looking for. It allows you to control permissions related to programs and actions on your system but it does not allow you to change the functioning of those programs/actions. If you decide to use polkit for a purpose other than what you're asking about here, the configuration files in Debian/Ubuntu are located at /usr/share/polkit-1.



              You are correct that udisks is taking care of your auto-mounting. Despite what the user in your link states, there is no way to configure udisks as stated in their answer. The example they give shows command line mounting, not a configuration.



              The best way of achieving your goal is indeed to use /etc/fstab. A line such as




              /dev/XXX /media/DRIVENAME auto user,umask=0000 0 0




              will achieve what you're trying to accomplish.





              share


























                0












                0








                0







                I don't think that polkit is what you're looking for. It allows you to control permissions related to programs and actions on your system but it does not allow you to change the functioning of those programs/actions. If you decide to use polkit for a purpose other than what you're asking about here, the configuration files in Debian/Ubuntu are located at /usr/share/polkit-1.



                You are correct that udisks is taking care of your auto-mounting. Despite what the user in your link states, there is no way to configure udisks as stated in their answer. The example they give shows command line mounting, not a configuration.



                The best way of achieving your goal is indeed to use /etc/fstab. A line such as




                /dev/XXX /media/DRIVENAME auto user,umask=0000 0 0




                will achieve what you're trying to accomplish.





                share













                I don't think that polkit is what you're looking for. It allows you to control permissions related to programs and actions on your system but it does not allow you to change the functioning of those programs/actions. If you decide to use polkit for a purpose other than what you're asking about here, the configuration files in Debian/Ubuntu are located at /usr/share/polkit-1.



                You are correct that udisks is taking care of your auto-mounting. Despite what the user in your link states, there is no way to configure udisks as stated in their answer. The example they give shows command line mounting, not a configuration.



                The best way of achieving your goal is indeed to use /etc/fstab. A line such as




                /dev/XXX /media/DRIVENAME auto user,umask=0000 0 0




                will achieve what you're trying to accomplish.






                share











                share


                share










                answered 2 mins ago









                Olek WojnarOlek Wojnar

                126114




                126114






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473174%2fconfigure-udisks-permission%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

                    Loup dans la culture

                    How to solve the problem of ntp “Unable to contact time server” from KDE?

                    Connection limited (no internet access)