rsync preserve permissions
-
-
What are the filesystems types on Truenas disk and OMV disk? Do they both support permissions?
-
Hi,
Yes both support permissions. Truenas is done in ZFS and OMV6 is done in ext4
-
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.
-
-
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
-
-
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.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!