Remote mount SMB/CIFS folder from router - folders owned by root

  • Hi all,
    I configured e remote mount for a folder exposed by my router (with usb hdd attached).


    The issue I'm facing is when I use rsync to backup stuff on this folder.
    Source is:

    pi@raspberrypi:~/local_drive/tmp/test$ ll
    total 4.0K
    drwxr-sr-x 2 pi users 4.0K May 13 23:26 file1.txt

    File owned by pi of group users.

    Destination becomes:

    pi@raspberrypi:~/router_hdd/rsync/tmp/test$ ll
    total 0
    drwxrwxrwx 1 root root 0 May 14 12:56 file1.txt

    owned by root.

    What happens if that each time I execute rsync it always perform data transfer because source and dest file are not considered equal.

    Rsync script:

    cd /home/pi/raspberry-mcg/script/backup/;
    ./solo -port=9999 rsync -avz \
    --delete \
    --progress \
    --exclude-from='/home/pi/raspberry-mcg/script/backup/rsync_exclude.txt' \
    --log-file='/home/pi/router_hdd/rsync/tmp/sync_router_hdd_small.log' \
    /home/pi/local_drive/tmp/test /home/pi/router_hdd/rsync/tmp

    Also if I move into folder of this "remote mount" shared folder and I (user pi) create a file it ends up owned by root.

    What is my error?

  • Maybe you need the same user accounts on both sides?

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • The issue is that router hasn't a "smart" interface for handling this shared device.
    Very basic configuration: add device, protect with password, quota.

    I had also some trouble to find out that I should use "vers=1.0" in connection string :(

  • Hi all,
    coming back to this topic.
    I still have the same issue: "Remte Mount" + "Shared folder" make directories in the file system that are owned by root.
    I want to use the remote mounted drive (usb drive attached to router) for backup and I don't want that backup files are owned by root.

    How can I change ownership for folder inside the "Remote Mount"?

  • mcgyver83

    Set the Label from OMV 4.x to OMV 5.x
  • mcgyver83

    Changed the title of the thread from “Remote mount SMB/CIFS folder from router” to “Remote mount SMB/CIFS folder from router - folders owned by root”.
  • Thanks I will try.

    But How can I mount a shared SMB drive (exposed by the router) on a local folder owned by a specific user?
    My issue is that /srv/xxxxxx is owned by root:root. I can browse folders but cannot create any file

  • In the proposed link there is no mention to extra-options




    In Extra options, note the additional commands added:

    These commands are necessary due to the origin of the files. Files and folders are being pulled from a “foreign volume” where the root account and the users group are different from the same accounts and user group, with the same names, on the local machine. When files and folders are imported from a foreign source, the default “create mask” is applied which is root:root - 0755 for folders and 0644 for files (depending on the create location).

    It's necessary to change ownership (chown) to the local root account and the local users group, and to modify access permissions (chmod). In this case –chmod=0775 and –chown=root:users was used. This is the equivalent of:

    Owner – root Read/Write/Execute

    Group – users Read/Write/Execute

    Others – Read/Execute

    See Further Notes on Permission commands, for setting the appropriate permissions for imported files.


  • Ok now I got it.
    Not Extra options from remote mount configuration but in the SMB Share configuration.

    I was referring to the filesystem folder used as mounting point (/srv/485245asadasdsa).

    I sometimes forget that OMV is dedicate to configure a nas, so is not supposed you access its real filesystem via ssh or similar :(

  • Look at the label in the pic,, it's in the rsync job's options. You NEED to read the document. No one can help you if you won't.

    I sometimes forget that OMV is dedicate to configure a nas, so is not supposed you access its real filesystem via ssh or similar

    If you look at the New User Guide, you'll find all kinds of tips on "viewing" OMV's file system. Specifically, look for the sections on Midnight Commander and WinSCP.

  • How can I change ownership for folder inside the "Remote Mount"?

    If this is what you're trying to do, the answer is:
    Permissions to the remote file system are limited to the username + password used to mount the filesystem. The remote server "owns" the files. Permissions for the username + password used for the remote mount, are set at the remote server.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!