Mounting SMB share CIFS - permission denied

Hi all,

New to TrueNAS and I already tested but getting permission denied when mounting a truenas share. CIFS is installed on ubuntu

Trying to hook a network share to an ubuntu machine. I’m using this guide “mount-cifs-shares-permanently” at the ubuntu server doc site, following the steps for a credentials file.

  • share name: /mnt/data/fs1/books
  • fstab: //IP Address/books /mnt/books cifs credentials=/home/USERNAME/.smbcredentials 0 0
  • what’s in credentials > home directory for user that i made: /mnt/data/fs1/books

When checking users and the users permissions they have r/w and execute on the folder books.

TrueNAS audit logs show NT_STATUS_WRONG_PASSWORD

Here are the errors on the ubuntu server:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

checking dmesg shows

[    8.762849] netfs: FS-Cache loaded
[    8.824717] Key type cifs.spnego registered
[    8.824737] Key type cifs.idmap registered
[    8.825423] CIFS: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.
[    8.825426] CIFS: Attempting to mount //IP Address/books
[    8.855749] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[    8.855939] CIFS: VFS: \\IP Address Send error in SessSetup = -13
[    8.856290] CIFS: VFS: cifs_mount failed w/return code = -13
[    8.962774] EDID block 0 is all zeroes
[    9.905910] EDID block 0 is all zeroes
[   11.231731] EDID block 0 is all zeroes
[   12.208771] EDID block 0 is all zeroes
[  241.355195] CIFS: enabling forceuid mount option implicitly because uid= option is specified
[  241.355198] CIFS: enabling forcegid mount option implicitly because gid= option is specified
[  241.355199] CIFS: Attempting to mount //IP Address/books
[  241.359314] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[  241.359334] CIFS: VFS: \\IP Address Send error in SessSetup = -13
[  241.359366] CIFS: VFS: cifs_mount failed w/return code = -13

i just want to add, i think the formatting is solid. i think i just probably don’t know how to properly give assign the permissions.

I’m only doing them at the user level in truenas, is the best way??

Please provide:

  1. The exact command you have used to mount the SMB share. Nevermind. I think I found it.
  2. Screenshot of the share permissions (aka ACL).

Did you actually set an IP address of your truenas?

1 Like

I used sudo mount /mnt/books and already premade the directory in that location in advance.

for the share permissions from which section? i currently permissions set per user and these are that users permission to the book folder

so forums aren’t letting me upload an image :confused:

wont let me put a link to the screenshot either

mounting the root dataset is not permitted, becaue it’s owned by root and root cant be used to acces smb shares.
You have to create a child dataset, create a dedicated user, edit the permissions on the cild dataset and then mount the child dataset.

Shares → Edit Filesystem ACL

Perhaps it is caused by low trust level. Zigbee key problem - #8 by dan

Hey Larse,

I am trying to mount the child folder books, that i created

This mount path wont work
you can’t share /mnt/poolname
you can only share out /mnt/poolname/datasetname

I don’t think this is the case.

looks like pool with name data. I could be wrong…

I haven’t made ACLs. l mentioned above but I only created a user and have been giving users direct permission to folders currently.

so i’ve been managing permissions via the credentials folder and modding the user permissions there

Did you create share on your truenas from the shell? If so, you should not. Almost all settings within truenas should be made from the GUI.

Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.

hmmm can you share an example? the forums isn’t letting me put screenshots.

If i go to datasets > click on folder name > check under dataset details > path > data/fs1/books

I gave the username access to books.

Im looking through the truenas menus in storage / datasets / and even credentials but don’t see anything using the term “poolname”

to make the shre i went to share > windows SMB > clicked add > used create dataset > for purpose used multi protocol > click enabled > then save.

afterwards I went to credntials > edited the user > made sure they had r/w and execute access

poolname and datasetname were just generic example names…

The only thing you left out is editing the permissions on the dataset to give the user you created permissions.

Ok. I think I understood the problem. You created a dataset, and gave permissions for it. This is all “internal” (or better said, inter-machine) linux stuff.

For the sake of it being accessible via SMB over the network, you must create an SMB share of this very dataset. You should take a look at this doc.

Nevermind, it’s not the case.

hmm for dataset permissions, the only options on that window are to set an owner or add a group. no option to add a user for some reason.

a questions, so is adding the user to that folder with r/w and execute under credentials not enough. I used to manage Active directory in the past and when giving permissions you could do it via a group or by directly assigning the user.

So direct user assignment wont work in truenas? just trying to understand, thanks

The permissions on the credentials tab are for the users home share. Not for general access to the dataset.

1 Like

Let’s sum up.

You created an SMB share in truenas. Then you followed this guide (am I correct?) to mount this share in the ubuntu.

If so, your /etc/fstab doesn’t contain sensitive info. Can you post it here without modification?

1 Like

Can you post the format of the fstab entry? You can change/hide sensitive info if desired, but keep the syntax and format in place.


What are the permissions and ownership for the file /home/USERNAME/.smbcredentials ?

Does the password contain any special characters?


Is the share name really “books”, and the path on the server is /mnt/data/fs1/books ?


Can you temporarily mount the share without fstab?

mkdir /mnt/smbtest
mount -t cifs -o ro,file_mode=0444,dir_mode=0555,uid=1000,gid=1000,username=truenasuser //192.168.0.100/share /mnt/smbtest

EDIT: Change the values accordingly, such as the IP address.