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.

1 Like

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 ^^

1 Like

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.