Messed up TrueNAS Scale Permissions after installing Nextcloud

Hello fellow Community members,
it’s my first time posting on any forum, so i hope I’m in the right category and all. Thank you in advance for all your help!

I wanna say i have tried to understand the documentation and googled but i can’t seem to filter out what i need to fix my issue. Very likely a skill issue :sweat_smile:

My issue is after trying to install Nextcloud as App under TrueNAS scale i have messed up permissions. During creation i put it in the same dataset as my NFS share, because i thought that way i would give it access to my files (it’s my first time dabbling in this and i should have not just tried without informing myself better, i know now). After not really being sure what i just did since i couldn’t access the Nextcloud WebGUI i gave up as it was late.
I only noticed something was wrong when trying to write in an Obsidian note. I got an error saying i have no permissions.
image
My Obsidian vault is stored on my NFS share.
I saw later that i lost permissions to some of my files.
Below the main folder in my NFS share, it has this grey X now.


Here the folder structure of my Obsidian vault, the files there didn’t have these grey locks before.

Also in the Dataset permissions it says now that Netdata is the owner and it belongs to the group Docker. Here the screenshots:

This is what i have figured out so far, if someone could point me in the right direction, I’d be so happy, since i am not sure what i can now even do to regain permission over my files.
If more infos are needed i am happy to provide them.
It would be also fine for me to just copy all my data off the share, nuke my TrueNAS install and set it up again. But right now i can’t even copy my files :sweat_smile:

Again thank you all for your time and have a lovely morning/day/evening!!

1 Like

The underlying system is still just a Debian install. If you SSH with root you can still copy over all your data to a safe location to avoid losing anything while messing with it.

Meanwhile, through the GUI, the dataset MeanPool should have root permission for user and group and I think it’s possible to restore them downstream. For your own dataset try and change user and group to your user and see if data becomes accessible once more.

2 Likes

Thank you for your quick reply, and sorry for mine so late.
I will try your suggestions as soon as i get back home.
Thank you, and i will post an update.
:pray::pray::pray::pray:

Hello @MetalizeYourBrain
i’ve been trying now to change the permissions, but it seems to not help me much.
After enabling SSH i logged in from my PC as admin, made myself sudo via sudo su root and used:
“chown -c admin /mnt/MeanPool/philippo/”
To get the output:
“changed ownership of ‘/mnt/MeanPool/philippo/’ from 777 to admin”
used:
chown -c admin /mnt/MeanPool/philippo/2ndBrain/Obsidan\ Shared\ Vault
To get output:
“changed ownership of ‘/mnt/MeanPool/philippo/2ndBrain/Obsidan Shared Vault’ from netdata to admin”
used:
“chown -c admin /mnt/MeanPool/philippo/2ndBrain/”
To get output:
“changed ownership of ‘/mnt/MeanPool/philippo/2ndBrain/’ from netdata to admin”
Used:
“chown -c admin /mnt/MeanPool/”
To get output:
“changed ownership of ‘/mnt/MeanPool/’ from netdata to admin”

I realize some of that was redundant but i was testing around for what works.
I also had Some failed attempts like:
“chown 777 admin /mnt/MeanPool/philippo”
To get output:
“chown: cannot access ‘admin’: No such file or directory”

Which is where the 777 from the first output comes from, because one combination worked, but i don’t have that in-/output anymore.

In retrospective, for the root dataset this was necessary since the GUI wasn’t gonna let me change this, but for the child dataset “philippo” i could have probably changed the Permissions in the GUI, which i later figured out how to do for the user group.

So currently the situation looks like this:
The permissions for the root dataset

The permissions for the child dataset philippo (i had admin instead of root before, from my chown changes, but then tried root via the GUI, since with admin i still wasn’t able to access my files via the file explorer)

Files still look like this:
grafik

I also tried copying files with:
“cp -r /home/boss/Dokumente/Networkshare/2ndBrain/Richtlinien/ /home/boss/Dokumente/bakupfromnasafterbroke”
which did work, but only for files that are not locked.

i did also try:
“scp [email protected] /mnt/MeanPool/philippo/2ndBrain/Richtlinien /home/boss/Dokumente/bakupfromnasafterbroke”
To get output:
“cp: der Aufruf von stat für ‘[email protected]’ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
cp: der Aufruf von stat für ‘/mnt/MeanPool/philippo/2ndBrain/Richtlinien’ ist nicht möglich: Datei oder Verzeichnis nicht gefunden”
Translation:
“cp: the call of stat for ‘[email protected]’ is not possible: file or directory not found
cp: the call of stat for ‘/mnt/MeanPool/philippo/2ndBrain/policies’ is not possible: file or directory not found”

I am now wondering:

  1. Should the admin or root user group on the child dataset not solve my problem?
  2. Is there a method to copy via the terminal that i haven’t grasped? (My thought process was, via SSH should work cause i have the admin access; mostly i am concerned about the files i can’t gain permission too)
  3. Is it possible that i don’t have access to the root user, because i do have a root password written down, but i usually just access the GUI via admin, were i have all the access i usually need.
    4 What are the grey X’s and Locks that i am seeing, i haven’t really found anything about that. I am thinking once i get that maybe i can look in the correct direction.

grafik
grafik

Hope i am not too confusing, it’s been an eventful week.
Appreciate the support :blush::blush::blush:

This syntax is wrong. chown changes the owner of the files. Using the 777 changes the permission to access files. To use it you the correct syntax is "chmod 777 files or directory.

When changing permissions and file owners make sure to use the rercursive flag so that all the contents of a folder change permissions and owners correctly.

The command syntax is not correct. You should put the starting directory first, then the remote connection followed by the remote folder.

Try to correctly set recursive permissions on the whole dataset and check syntax of every command you’re using when you see errors.

Also, before doing any permission modification, you should’ve used root to just copy all the files to another location. Better not screw too much with files you have no backup of.

2 Likes

Hello again @MetalizeYourBrain
thank you so much for guiding me through this.
i finally figured it out. :tada::tada::tada:

I am using the command below now to copy things over to my PC. Seems to be working now and so far the files that i wasn’t allowed to access when on the NAS i can access now on my internal disc, so the permissions aren’t an issue anymore. :tada::tada::tada:
scp -r [email protected]:/mnt/MeanPool/philippo/2ndBrain/Doks /home/boss/Dokumente/bakupfromnasafterbroke

I’ll be copying over all my things and will let you know if i ran into anything else.

thank you again so so much !!! :pray::pray::pray:

Probably nuking my install after everything is save just to get rid of everything i messed up.
Maybe even using HexOS when it is ready ^^

2 Likes

Glad I could help! You were on the right track and there were just minor things to correct to save all your files.

Sure, keep replying on the thread and make sure to tag me like you did this time so I get notified in case you don’t reply to one of my posts.

Absolutely no problem!

Sure, it can be good to start from scratch if you can’t fully trace back all the changes you made over time.
If you’re thinking about it they have it on sale for now so you could risk it. I’m personally of the idea that knowing as much as possible about what’s going on under the hood is always a good idea.

2 Likes

@MetalizeYourBrain
Hello :wave:
seems like i finally got there.
Took me a couple days to copy everything off, since for some reason i am now capped at 100Mbit/s up or download from/to the NAS. Even after reinstalling the newest TrueNAS scale 24.10.0.2 this hasn’t changed.
I know that the hardware can take advantage of the 2.5Gbit/s NICs, because i have had sustained speeds of 2.5Gbit/s before.

I have now given “Others” read/write/execute access to the Dataset in which i want to store my data, so that i can actually access my share and add folders, etc.

What i have noticed is that after rebooting my NAS, the discs in my VDEV are offline, so i gotta export/disconnect the pool and import it again, then everything works normally.

It also seems like after setting a static IP the update server can’t be accessed anymore.
I have seen this years ago and i think manually updating is what fixed that at some point.

So currently i am hoping that will also be the case now as well and i have my important stuff now “backed up” on an internal drive of my main rig and an external drive. :sweat_smile:

I think for now i will not touch my NAS and am just glad it works again and i didn’t lose my files messing around. :smiley:

And regarding HexOS, i got myself a license for the 99$, but seems like i gotta wait for the download link to be sent to me. Anyway it will be a beta, so probably it will still be some time till i can trust it with my files.
But i do agree, i also prefer to know what’s going on with my files and with my network, but it seems mostly trustworthy to me, once they have the selfhostable webgui, and if it can save me from all this trouble then it was money well spent :rofl:
And also this was now a strong reminder to consult the documentation beforehand and that my next project should be an actual proper backup of my files. :sweat_smile: :grinning:

In case you have another idea for my issues mentioned above, of course i’m happy to try and improve my situation. But for now i think i’ve bothered you enough and you already did a ton to help me. :pray: :pray: :pray:

1 Like

Good, that’s what matters the most.
Have you made sure it’s not anything weird happening on the network side? What’s TrueNAS reporting about maximum speed on an OS level?

Never seen anything like that. It’s surely related to the change in permissions. I wouldn’t know how to fix that honestly.

There’s nothing wrong in making your life easier with HexOS but, at the same time, being able to understand what’s going on.

Absolutely! RTFM as much as possible before diving in just to make sure about the general steps to reach your goal.

Not really, I’d need to do some research as you’ve been probably doing these days. If you find something you don’t understand and nobody can answer post it and I’ll try to help you out. Cheers!