SMB shares stopped working

jay133

Cadet
Joined
Mar 12, 2024
Messages
2
Hello! Last day got me really frustrated with the Truenas. I have a Truenas Core machine connected to my computer with Win10 directly through rj45. It's serves function as a big fast hard drive with a redundancy, nothing special. I have a separate 10gig ethernet adaptor for it. I had it working ok for the last year or so, few hickups here and there, but it worked. Yesterday, for some unknown reason SMB shares just stopped working. I tried to reconnect it, I deleted the user, stripped ACLs, deleted shares, created new user, created new shares, confiigured ACLs, everything according to youtube tutorials and truenas's official tutorial page, I tried it many times, but I still get "Can't get access..." message. I have access to webUI of truenas, so I updated Trunas Core to the latest version 13.0-u6.1 and nothing changed, I'm not really knowledged in networks, so I don't even know how to troubleshoot it or see what stoppes it. I tried almost everything basic I can imagine inside of truenas, adding ACLs recursively, restarted smb service, tried different approaches to ACLs, tried to login as root, tried to create separate datasets and share them. I've read through ton of similar threads, tried things, but it won't help/ I just can't do anything to make it work and I don't know why. I'm a windows guy and I've never did enything with linux so I don't have experience on troubleshooting stuff on truenas's shell. I'm desparate to make it work. I don't have antivirus stuff enabled on my pc and I don't need extra security stuff, I just it to work) Can you, please, help me, I'm so desperate right now) Maybe we can start by making it work somehow, not the "right" way, but some way and go from there, IDK.
 

Attachments

  • 2024-03-13_13-26-33.png
    2024-03-13_13-26-33.png
    5.9 KB · Views: 144
  • 2024-03-13_13-23-11.png
    2024-03-13_13-23-11.png
    726.5 KB · Views: 146
  • 2024-03-13_13-24-30.png
    2024-03-13_13-24-30.png
    192.4 KB · Views: 143
  • 2024-03-13_13-51-59.png
    2024-03-13_13-51-59.png
    260.8 KB · Views: 144

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
everything according to youtube tutorials

There's the problem :) Some very prominent youtube tutorials contain instructions that will 100% break access for your NAS. It looks like you followed the one that said to chmod 770 /mnt/<pool> for security reasons. This advice exposes a profound and deep misunderstanding of how permissions work in Linux, FreeBSD, MacOS, etc, and demonstrates that the youtuber should have done research before creating said video.

Code:
# file: /mnt/Critter_4x3_Z1
# owner: root
# group: wheel
            owner@:rwxp--aARWcCos:-------:allow
            group@:rwxp--a-R-c--s:-------:allow
         everyone@:------a-R-c--s:-------:allow
debug finished in 0 seconds for Critter_4x3_Z1
# file: /mnt/OLD_RAID_2x2
# owner: root
# group: wheel
            owner@:rwxp--aARWcCos:-------:allow
            group@:rwxp--a-R-c--s:-------:allow
         everyone@:------a-R-c--s:-------:allow
debug finished in 0 seconds for OLD_RAID_2x2


The above permissions basically prevents any process that isn't running as root from accessing your data. You can fix it by setting permissions to 755. chmod 755 /mnt/OLD_RAID_2x2.
 

jay133

Cadet
Joined
Mar 12, 2024
Messages
2
There's the problem :) Some very prominent youtube tutorials contain instructions that will 100% break access for your NAS. It looks like you followed the one that said to chmod 770 /mnt/<pool> for security reasons. This advice exposes a profound and deep misunderstanding of how permissions work in Linux, FreeBSD, MacOS, etc, and demonstrates that the youtuber should have done research before creating said video.

Code:
# file: /mnt/Critter_4x3_Z1
# owner: root
# group: wheel
            owner@:rwxp--aARWcCos:-------:allow
            group@:rwxp--a-R-c--s:-------:allow
         everyone@:------a-R-c--s:-------:allow
debug finished in 0 seconds for Critter_4x3_Z1
# file: /mnt/OLD_RAID_2x2
# owner: root
# group: wheel
            owner@:rwxp--aARWcCos:-------:allow
            group@:rwxp--a-R-c--s:-------:allow
         everyone@:------a-R-c--s:-------:allow
debug finished in 0 seconds for OLD_RAID_2x2


The above permissions basically prevents any process that isn't running as root from accessing your data. You can fix it by setting permissions to 755. chmod 755 /mnt/OLD_RAID_2x2.
Thank you so much! It helped! And, yes - you a right, I built a NAS with a tutorial that had chmod 770 in it)
Can I ask you one more question about permissions, that I don't get. I work with files from NAS, I can write files from NAS, but some programs have problems with permissions to delete or write files. Few examples:
-Davinchi Resolve, a video editing software can't write renders on NAS
-StudiOne - a sound recording program can write files on NAS, but can't delete files that it's projects contain, so I can't delete all bad takes from program
These are just two examples I have in mind right now, but there is more.
I know people in trunas community care about security, but right now I want to use TrueNAS as a big, fast and redundant HDD ouside of my main PC, so how can I set permissions or what should I do to make it happen?)
 
Top