POP_OS! Mounting SMB Shares via CIFS that are writeable

Trying to set up qBittorrent on POP_OS! to have it’s complete file directory as the SMB share on truenas scale. (should be simple, right?) :slight_smile: :melting_face:

Well, when you use the built-in Connect To Server in POP_OS! it mounts the drive with the path as:
/run/user/1000/gvfs/smb-share:server=truenas,share=[SMBFOLDER]/
This gives you write access from the POP_OS! filebrowser GUI (ie when correctly putting in your TrueNAS local user with write access when adding the SMB directory).

BUT qBittorrent cannot accept this as a filepath to write to, it crashes if you try to use that above as a filepath.

So off to the forums, and the recommended approach is to use cifs mount, All fine with this.
(Credit to very helpful resource for clear instructions on this.)

sudo mount -t cifs -o user=[SMB_USERNAME],vers=3.0,credentials= /root/.smbcredentials //truenas.local/[SMBFOLDER] /media/[LOCALMOUNT]

Sadly, however, when you create the SMB mount in this way it seems that POP_OS sees the owner as root, and POP_OS doesn’t allow you write access.

Tried sudo chmod to get write access for the mounted read-only directory, but that doesn’t work either.

Any suggestions?

Suggestion to self: continue reading more forums. Find post which explains how the CIFS command works in plain English :heart_eyes:

Share post with others to save them some time.

From that post:
sudo nano etc/fstab
add the line at the end using the template as below:
//truenas.local/[SMB_DIRECTORY] /media/[LOCAL_POP_DIRECTORY] cifs vers=3.0,credentials=/root/.smbcredentials,uid=1000,gid=1000 0 2

you want to use the uid and gid on POP_OS, not the ones on True NAS
and you can find these with:
id -u to get your user id and id -g to get your group id

Solved, so far. :slight_smile: