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).


    Code
    credentials=/home/pi/.cifscredentials-xase-7d0d-34ff-8a3b-asdf22vg44672,_netdev,iocharset=utf8,vers=1.0,nofail,user_xattr,sec=ntlmv2,domain=HOME


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


    Code
    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:


    Code
    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:

    Code
    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?

  • 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”.

Participate now!

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