What is the difference in rsync run from a command line vs bash script? The Next CEO of Stack...

Should I tutor a student who I know has cheated on their homework?

Customer Requests (Sometimes) Drive Me Bonkers!

Are there languages with no euphemisms?

Inappropriate reference requests from Journal reviewers

Visit to the USA with ESTA approved before trip to Iran

Robert Sheckley short story about vacation spots being overwhelmed

Why did we only see the N-1 starfighters in one film?

WOW air has ceased operation, can I get my tickets refunded?

Need some help with wall behind rangetop

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Can the Reverse Gravity spell affect the Meteor Swarm spell?

If the heap is initialized for security, then why is the stack uninitialized?

Why here is plural "We went to the movies last night."

Why do remote companies require working in the US?

What does "Its cash flow is deeply negative" mean?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

How to Reset Passwords on Multiple Websites Easily?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

What's the point of interval inversion?

How to write the block matrix in LaTex?

Apart from "berlinern", do any other German dialects have a corresponding verb?

The King's new dress

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?

Can a single photon have an energy density?



What is the difference in rsync run from a command line vs bash script?



The Next CEO of Stack OverflowWhat is the difference between double and single square brackets in bash?What is archive mode in rsync?How to run a command multiple times, using bash shell?rsync not deleting foldersRSYNC only listing files when run from bash scriptrsync backup remote server maintaining groups and ownerMystic rsync over nfs issue - same error messages but on different files every timewhy does 'rsync --delete-before' delete files from target that still exist at the source?Rsync with rsync daemon is not preserving owners or groupsRsync 8 Devices nightly - all files come in but nothing goes out












0















I am trying to rsync without modifying the destination file owners or groups using the below:



rsync -rltD /tmp/a/test.txt /a/b/c/test.txt 


Destination before any change:



-rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


Destination after I run it from command line as userA (the contents are updated):



-rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


Destination after I run a script with the same rsync code as above as userA, nothing else (contents and owner has been updated):



-rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


Additional Info



Source:



-rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


Script:



-rwxrwxr-x 1 root groupA 293 Mar 28 18:04 test.sh


What am I missing? One would expect both to yield the same result.










share|improve this question









New contributor




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

























    0















    I am trying to rsync without modifying the destination file owners or groups using the below:



    rsync -rltD /tmp/a/test.txt /a/b/c/test.txt 


    Destination before any change:



    -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


    Destination after I run it from command line as userA (the contents are updated):



    -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


    Destination after I run a script with the same rsync code as above as userA, nothing else (contents and owner has been updated):



    -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


    Additional Info



    Source:



    -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


    Script:



    -rwxrwxr-x 1 root groupA 293 Mar 28 18:04 test.sh


    What am I missing? One would expect both to yield the same result.










    share|improve this question









    New contributor




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























      0












      0








      0








      I am trying to rsync without modifying the destination file owners or groups using the below:



      rsync -rltD /tmp/a/test.txt /a/b/c/test.txt 


      Destination before any change:



      -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Destination after I run it from command line as userA (the contents are updated):



      -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Destination after I run a script with the same rsync code as above as userA, nothing else (contents and owner has been updated):



      -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Additional Info



      Source:



      -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Script:



      -rwxrwxr-x 1 root groupA 293 Mar 28 18:04 test.sh


      What am I missing? One would expect both to yield the same result.










      share|improve this question









      New contributor




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












      I am trying to rsync without modifying the destination file owners or groups using the below:



      rsync -rltD /tmp/a/test.txt /a/b/c/test.txt 


      Destination before any change:



      -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Destination after I run it from command line as userA (the contents are updated):



      -rw-rw-r-- 1 root groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Destination after I run a script with the same rsync code as above as userA, nothing else (contents and owner has been updated):



      -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Additional Info



      Source:



      -rw-rw-r-- 1 userA groupA 19 Mar 22 10:43 /a/b/c/test.txt


      Script:



      -rwxrwxr-x 1 root groupA 293 Mar 28 18:04 test.sh


      What am I missing? One would expect both to yield the same result.







      linux rsync






      share|improve this question









      New contributor




      Quantum entnagled 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




      Quantum entnagled 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








      edited 2 mins ago







      Quantum entnagled













      New contributor




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









      asked 1 hour ago









      Quantum entnagledQuantum entnagled

      11




      11




      New contributor




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





      New contributor





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






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






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          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
          });


          }
          });






          Quantum entnagled 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%2fserverfault.com%2fquestions%2f960564%2fwhat-is-the-difference-in-rsync-run-from-a-command-line-vs-bash-script%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Quantum entnagled is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Quantum entnagled is a new contributor. Be nice, and check out our Code of Conduct.













          Quantum entnagled is a new contributor. Be nice, and check out our Code of Conduct.












          Quantum entnagled is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Server Fault!


          • 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%2fserverfault.com%2fquestions%2f960564%2fwhat-is-the-difference-in-rsync-run-from-a-command-line-vs-bash-script%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

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...