Synology NAS - Changing Rights

I have learned that when mounting a drive, it matters greatly what kind of file system it has.

If it’s a windows-type filesystem then in order to have write access you must do the -o uid=user,gid=user (or 1000s work instead of user, at least for me) to be able to have read write access. (I’ve never needed the umask, but maybe you do).

If on the other hand it’s some liinux file system (like some of my thumbdrives, and also other drives I mount sometimes) you must not do that; it won’t let you mount the drive at all.

So what kind of file system are you mounting? vfat, exfat and ntfs will require the user and group IDs. Things like ext3 and ext4 won’t work if you try using the user and group IDs.

I much prefer nfs over smb, but I use smb for my qubes-based synology mounts.

To use SMB, you will need to have the cifs-utils package installed (assuming fedora).
I have an enhanced template which I base certain VMs on, and it installs the requisite packages. I keep an in the /root/ of the template, and I migrate whenever the template needs to change. Here is an excerpt: dnf -y install cifs-utils

Within a VM, if i wish to mount something from the nas, I use the following script.
You will need the password for the NAS user. i keep mine in some password manager, but I suppose one could embed it in the script.

# usage:
#     ~/bin/nas
#       -- mount ${SRC} on ~/nas/${SRC}, read only
#     ~/bin/nas SomethingElse rw
#       -- mount SomethingElse on ~/nas/SomethingElse, read/write
# We pass ${UID} to the mount command so that whatever resource we
# mount is mapped to being owned by the local user.


[[ ${UID} == 0 ]] && {
        echo "do not run this as root or via 'sudo'"
        exit 1

OPTS="-o user=${NAS_USER},uid=${UID},${RO}"

[[ -d ~/nas/${SRC} ]] || mkdir -p ~/nas/${SRC}

sudo mount.cifs  //${NAS_IP}/${SRC} ~user/nas/${SRC} ${OPTS}

Also true of debian.