Unable to access share as root user from client

Joined
Dec 29, 2021
Messages
6
Hello All,

I am on day 1 of running TrueNas' free edition and am having an issue. I was able to successfully setup a windows and nfs share and both are mostly accessible. I am having issues with the nfs side of the share. The main goal is to have this share available for my servers to back themselves up to. I was able to mount the share manually and from what I can see, I cannot mount the nfs using fstab because there's no way to supply the user and password in the fstab file. I'm hoping someone tells me I'm wrong, but I scripted my way around it by having my backup script mount and unmount the share as needed.

Since I want to do a full system backup up all files, I am running rsync as root for the backup. When I run the command
Code:
"sudo rsynch blah blah options"
I get a Access Denied error (not verbatim but it won't let me into the shared folder). If I try to cd or ls the share as root or using sudo, permission is denied. However, I can do whatever I want in the share if I'm not running commands as root. Can anyone help with that? I'm assuming it has to do with my permissions in TrueNas. I've tried every combination I could find and cannot resolve the issue. Is this a security feature?

A few details:
My TrueNas instance is on a standalone box (no VM) with nothing else on it. It was freshly installed a few hours ago. The user for this datastore is the name of the server, however the username for the server to be backed up is different, which I'd expect is fine since I'm providing creds when mounting the share and it works as long as I'm not root on the client.

If there is any more information needed, I'll be happy to provide it.

Thanks in advance for any advice!
 
Joined
Dec 29, 2021
Messages
6
It looks like it is permissions. If I add write access to "everyone" I can write to the folder as root from the client machine I'm backing up. I don't understand how this is happening since I'm providing the credentials to log into truenas with. I need to be able to keep this folder read-only to "everyone" while still allowing root to write to it.

I created a folder in my mount folder on the client and noticed that the file ownership is strange. The folder is owned by nobody:usergroup instead of user:usergroup.
 
Last edited by a moderator:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I apologize for all of the posts, but I don't see an edit button.

No worry, no need to apologize. New users are somewhat limited due to abuse by spammers. Us moderators can "fix" stuff if we believe it necessary or makes things flow better, as seen above.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
The SMB service won't allow root to be a user that connects to a share, so maybe that's involved here.

Making your user a member of wheel should take care of any permissions restrictions you would otherwise encounter.
 
Joined
Dec 29, 2021
Messages
6
The SMB service won't allow root to be a user that connects to a share, so maybe that's involved here.

Making your user a member of wheel should take care of any permissions restrictions you would otherwise encounter.
Fair enough. The user is part of the wheel group, but couldn't get access to some of the files. That is not a TrueNas issue, so I will look into that myself. I sincerely appreciate the quick response, thanks!
 

M0Pegasus

Cadet
Joined
Jul 4, 2022
Messages
5
Fair enough. The user is part of the wheel group, but couldn't get access to some of the files. That is not a TrueNas issue, so I will look into that myself. I sincerely appreciate the quick response, thanks!
Hi i know it is old but iam facing the same issue did find any soultion for it
 
Top