rsync preserve permissions

  • Hi There,


    I would like to rsync from a Truenas to OMV6.


    The only thing missing is the preservations of the permissions.

    I even added as extra -o -g in the config of the OMV6 module config file.

    My files seem to get the user and group set in the config file of the module


    What can I do?

    Kind regards...
    Guy

  • Only root is allowed to change owner / group, so the module has to be run as root.

    You should ask for authentication in the config.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hi there,


    As you can see in screenshot I think this is established here.




    I did the Authentication but the results aren't correct.

    The main group lacks the user and resorts to a number.
    Sometimes the group is translated but often not.


  • You are still running the module (user doing the file transfer as nobody).


    There are two things:

    • Which user is used to do the file transfer and setting of file attributes and
    • Who is allowed to send files to the server (Authentication)

    If root is doing the file transfer (because you want to preserve ownership / groups / permissions), you have to control who will send files.


    Prevent this:

    Eve will create a script with SUID bit set and transfer it to your OMV and execute it there. And even better if the script is world writable.


    make sure you have users / groups on both sieds and if not take al look at --usermap --groupmap in der man page https://rsync.samba.org/ftp/rsync/rsync.html

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • You are still running the module (user doing the file transfer as nobody).

    This I don't understand...In the screenshot I Cleary see that I'm asking to do a rsync as root.


    I'm reading up the provided man page...

    Thanks for the provided support.
    Guy Forssman

  • What you do is a little different from a cli call to the remote executable rsync.


    Here you define an rsync module (think of it as a server process listening for requests to sync data). This server process is running as user nobody in above config.


    You connect to the server rprocess as user root, but this does not change the user the server is running at.


    Maybe this analogy helps:

    Someone sends letters to your postbox (root) and someone takes the letters from the postbox and stores them in your house (nobody).

    Nobody does not have the permission to do what the sender wants him to do in your house.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!