1

In my Home Lab, I have an Ubuntu 20.04 Server and a Raspberry Pi as a VPN.

I have two separate Samba shares on both machines.

What I'm trying to do is mounting the Samba share on the Ubuntu server to the RPi and then connect to the RPi's Samba share. In order to have write access to Ubuntu Servers Samba, I'm trying to change the ownership of the cifs mounted share on the RPi server.

Ubuntu Server             |      Raspberry Pi      |
      |                   |           |            |
    Samba---------------> |Mount via cifs--->Samba |-------VPN----> My Laptop
                          |(on a Folder inside     |
                          |Raspberry's Samba share)|

The command I'm mounting with:

sudo mount -t cifs -o credentials=xyz //ip_address/folder_name /path/to/mount

Running sudo chown username:username * -v returns changed ownership of "files" from root:root to username:username but when I check, it's still root:root.

Is there a setting that I'm missing, or should I forward some ports (different from 139 and 445) and not deal with this setup?

1 Answer 1

0

Try using the mount options, network filesystems inherit their permissions on a filesystem level. Here are a few options that could help:

mount -t cifs -o rw,uid=1000,user=$User /dev/$Device /mnt/$Directory

https://www.samba.org/~ab/output/htmldocs/manpages-3/mount.cifs.8.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .