SOS Directory Nightmare - Possible for a directory to have two different users with full access?












1















I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.



The directory is a samba share. I want a user, bob, to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.



I am somewhat new to Ubuntu, but I have spent hours and hours on this.



Any suggestions would be VERY VERY VERY VERY VERY appreciated!










share|improve this question







New contributor




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





















  • Directly on the server, or from a connected SMB client?

    – AlexP
    Jan 8 at 1:42











  • If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

    – AlexP
    Jan 8 at 1:49













  • The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

    – Kurt Kaiser
    Jan 8 at 1:51













  • The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

    – AlexP
    Jan 8 at 1:52






  • 3





    Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

    – Takkat
    Jan 8 at 7:33


















1















I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.



The directory is a samba share. I want a user, bob, to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.



I am somewhat new to Ubuntu, but I have spent hours and hours on this.



Any suggestions would be VERY VERY VERY VERY VERY appreciated!










share|improve this question







New contributor




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





















  • Directly on the server, or from a connected SMB client?

    – AlexP
    Jan 8 at 1:42











  • If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

    – AlexP
    Jan 8 at 1:49













  • The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

    – Kurt Kaiser
    Jan 8 at 1:51













  • The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

    – AlexP
    Jan 8 at 1:52






  • 3





    Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

    – Takkat
    Jan 8 at 7:33
















1












1








1


1






I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.



The directory is a samba share. I want a user, bob, to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.



I am somewhat new to Ubuntu, but I have spent hours and hours on this.



Any suggestions would be VERY VERY VERY VERY VERY appreciated!










share|improve this question







New contributor




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












I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.



The directory is a samba share. I want a user, bob, to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.



I am somewhat new to Ubuntu, but I have spent hours and hours on this.



Any suggestions would be VERY VERY VERY VERY VERY appreciated!







command-line server permissions samba directory






share|improve this question







New contributor




Kurt Kaiser 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 question







New contributor




Kurt Kaiser 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 question




share|improve this question






New contributor




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









asked Jan 8 at 1:18









Kurt KaiserKurt Kaiser

61




61




New contributor




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





New contributor





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






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













  • Directly on the server, or from a connected SMB client?

    – AlexP
    Jan 8 at 1:42











  • If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

    – AlexP
    Jan 8 at 1:49













  • The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

    – Kurt Kaiser
    Jan 8 at 1:51













  • The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

    – AlexP
    Jan 8 at 1:52






  • 3





    Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

    – Takkat
    Jan 8 at 7:33





















  • Directly on the server, or from a connected SMB client?

    – AlexP
    Jan 8 at 1:42











  • If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

    – AlexP
    Jan 8 at 1:49













  • The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

    – Kurt Kaiser
    Jan 8 at 1:51













  • The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

    – AlexP
    Jan 8 at 1:52






  • 3





    Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

    – Takkat
    Jan 8 at 7:33



















Directly on the server, or from a connected SMB client?

– AlexP
Jan 8 at 1:42





Directly on the server, or from a connected SMB client?

– AlexP
Jan 8 at 1:42













If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

– AlexP
Jan 8 at 1:49







If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl.

– AlexP
Jan 8 at 1:49















The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

– Kurt Kaiser
Jan 8 at 1:51







The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex?

– Kurt Kaiser
Jan 8 at 1:51















The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

– AlexP
Jan 8 at 1:52





The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers?

– AlexP
Jan 8 at 1:52




3




3





Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

– Takkat
Jan 8 at 7:33







Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/…

– Takkat
Jan 8 at 7:33












1 Answer
1






active

oldest

votes


















1














sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare


will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.



See the manual pages for access control lists and setfacl for details.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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
    });


    }
    });






    Kurt Kaiser is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107854%2fsos-directory-nightmare-possible-for-a-directory-to-have-two-different-users-w%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









    1














    sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare


    will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.



    See the manual pages for access control lists and setfacl for details.






    share|improve this answer




























      1














      sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare


      will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.



      See the manual pages for access control lists and setfacl for details.






      share|improve this answer


























        1












        1








        1







        sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare


        will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.



        See the manual pages for access control lists and setfacl for details.






        share|improve this answer













        sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare


        will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.



        See the manual pages for access control lists and setfacl for details.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 8 at 2:05









        AlexPAlexP

        7,44511428




        7,44511428






















            Kurt Kaiser is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Kurt Kaiser is a new contributor. Be nice, and check out our Code of Conduct.













            Kurt Kaiser is a new contributor. Be nice, and check out our Code of Conduct.












            Kurt Kaiser is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1107854%2fsos-directory-nightmare-possible-for-a-directory-to-have-two-different-users-w%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

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?