Ownership moving a file from two SMB shares

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











up vote
0
down vote

favorite












I have created two SAMBA shares, the first one is called NAS, the second one is called OPENSHARE. OPENSHARE is a directory inside NAS used for guest access.



The only user of NAS is Dan and all new files into NAS are created with owner=Dan and group=nas.



The only user of OPENSHARE is Openshare and all new files into OPENSHARE are created with owner= Openshare and group= Openshare.



The config files is following:



NAS:



[NAS]
comment = WD_NAS
path = /mnt/WD/
create mask = 0740
directory mask = 0750
read only = no
browseable = yes
force group=nas
guest ok = no
writeable = Yes
hide unreadable = yes
valid users= Dan
access based share enum = yes


OPENSHARES:



[OpenShares]
comment = WD_OpenShare
path = /mnt/WD/OpenShares
create mask = 770
directory mask = 770
read only = no
browseable = yes
force user=openshares
force group=openshares
guest ok = no
writeable = Yes
hide unreadable = yes
valid users= openshares
access based share enum = yes


I am asking for help as when I move a file from OPENSHARE to NAS, it keeps Openshare ownership (user and group).



I would like that every moved file from OPENSHARE to NAS, gets Dan ownership as the file were created into NAS.



How shall I modify the configuration?







share|improve this question


























    up vote
    0
    down vote

    favorite












    I have created two SAMBA shares, the first one is called NAS, the second one is called OPENSHARE. OPENSHARE is a directory inside NAS used for guest access.



    The only user of NAS is Dan and all new files into NAS are created with owner=Dan and group=nas.



    The only user of OPENSHARE is Openshare and all new files into OPENSHARE are created with owner= Openshare and group= Openshare.



    The config files is following:



    NAS:



    [NAS]
    comment = WD_NAS
    path = /mnt/WD/
    create mask = 0740
    directory mask = 0750
    read only = no
    browseable = yes
    force group=nas
    guest ok = no
    writeable = Yes
    hide unreadable = yes
    valid users= Dan
    access based share enum = yes


    OPENSHARES:



    [OpenShares]
    comment = WD_OpenShare
    path = /mnt/WD/OpenShares
    create mask = 770
    directory mask = 770
    read only = no
    browseable = yes
    force user=openshares
    force group=openshares
    guest ok = no
    writeable = Yes
    hide unreadable = yes
    valid users= openshares
    access based share enum = yes


    I am asking for help as when I move a file from OPENSHARE to NAS, it keeps Openshare ownership (user and group).



    I would like that every moved file from OPENSHARE to NAS, gets Dan ownership as the file were created into NAS.



    How shall I modify the configuration?







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have created two SAMBA shares, the first one is called NAS, the second one is called OPENSHARE. OPENSHARE is a directory inside NAS used for guest access.



      The only user of NAS is Dan and all new files into NAS are created with owner=Dan and group=nas.



      The only user of OPENSHARE is Openshare and all new files into OPENSHARE are created with owner= Openshare and group= Openshare.



      The config files is following:



      NAS:



      [NAS]
      comment = WD_NAS
      path = /mnt/WD/
      create mask = 0740
      directory mask = 0750
      read only = no
      browseable = yes
      force group=nas
      guest ok = no
      writeable = Yes
      hide unreadable = yes
      valid users= Dan
      access based share enum = yes


      OPENSHARES:



      [OpenShares]
      comment = WD_OpenShare
      path = /mnt/WD/OpenShares
      create mask = 770
      directory mask = 770
      read only = no
      browseable = yes
      force user=openshares
      force group=openshares
      guest ok = no
      writeable = Yes
      hide unreadable = yes
      valid users= openshares
      access based share enum = yes


      I am asking for help as when I move a file from OPENSHARE to NAS, it keeps Openshare ownership (user and group).



      I would like that every moved file from OPENSHARE to NAS, gets Dan ownership as the file were created into NAS.



      How shall I modify the configuration?







      share|improve this question














      I have created two SAMBA shares, the first one is called NAS, the second one is called OPENSHARE. OPENSHARE is a directory inside NAS used for guest access.



      The only user of NAS is Dan and all new files into NAS are created with owner=Dan and group=nas.



      The only user of OPENSHARE is Openshare and all new files into OPENSHARE are created with owner= Openshare and group= Openshare.



      The config files is following:



      NAS:



      [NAS]
      comment = WD_NAS
      path = /mnt/WD/
      create mask = 0740
      directory mask = 0750
      read only = no
      browseable = yes
      force group=nas
      guest ok = no
      writeable = Yes
      hide unreadable = yes
      valid users= Dan
      access based share enum = yes


      OPENSHARES:



      [OpenShares]
      comment = WD_OpenShare
      path = /mnt/WD/OpenShares
      create mask = 770
      directory mask = 770
      read only = no
      browseable = yes
      force user=openshares
      force group=openshares
      guest ok = no
      writeable = Yes
      hide unreadable = yes
      valid users= openshares
      access based share enum = yes


      I am asking for help as when I move a file from OPENSHARE to NAS, it keeps Openshare ownership (user and group).



      I would like that every moved file from OPENSHARE to NAS, gets Dan ownership as the file were created into NAS.



      How shall I modify the configuration?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 2 at 23:41









      Yurij Goncharuk

      2,2582521




      2,2582521










      asked Apr 2 at 21:38









      Daniele

      11




      11

























          active

          oldest

          votes











          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%2f435140%2fownership-moving-a-file-from-two-smb-shares%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435140%2fownership-moving-a-file-from-two-smb-shares%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?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?