Mounting problems

Hopefully this is the right spot for this. I am having troubles mounting a smb drive to a ubuntu server. It works in windows but for some reason it fails to mount with an error that it is read only on my ubuntu server.
I have done so much searching but unable to find a resolution as of yet. Things I have tried so far:
zfs get readonly - no values are listed as on
command to mount is:
sudo mount -t cifs -o rw,vers=3.0,credentials=/etc/samba/.smbcreds,uid=34,gid=34 //192.168.1.xxx/folder /mnt/folder
Deleted dataset and wiped drives.
Created new SMB shares.
I am sure it is something small that I am missing but I can’t seem to find the solution. Any help is appeciated.

1 Like

Just to confirm, your Ubuntu user’s UID is 34? You sure it’s not 1000?

If it’s really 34, then you can:

Add file_mode=640,dir_mode=750 to your mount command.

My ubuntu uid is 1000. I was trying to adapt the command from a previous one that worked. I am guessing it is the command then.
I removed the uid and gid but that didn’t work. I tried uid=1000 and also adding the command you suggested to the original command but that still gave me the read only error. I am thinking I need to go back to researching my command.

What is the full command you used?

Was it this:

sudo mount -t cifs -o rw,credentials=/etc/samba/.smbcreds,uid=1000,gid=1000,file_mode=640,dir_mode=750 //192.168.1.xxx/folder /mnt/folder

Does the TrueNAS user (whomever is specified in your “creds”) have read-write access in this dataset on the server?

What are the permissions/ownership of this dataset?

You are not sharing the root dataset, correct?

(You don’t need to specify the SMB “vers”, since it is auto-negotiated.)

Yes, the user has read/write/execute on the child data set. It goes
Media → photosDataset

Yeah that is the command I am running except the folder names are different.

So what I ended up doing was creating a NFS share on the same data set. It seems to be working fine. I can access the data via smb on windows and nfs on my server.

Not sure if this is a best practice but it works for now.