SOLVED Backing on a FreeNAS using backintime

Status
Not open for further replies.

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Code:
[freenasuser@freenas ~]$ getfacl /mnt/freenaspool/Media/test/a
# file: /mnt/freenaspool/Media/test/a
# owner: freenasuser
# group: freenasgroup
			owner@:rwxpDdaARWcCos:------I:allow
			group@:rwxpDdaARWcCos:------I:allow
		 everyone@:r-x---a-R-c---:------I:allow
Nice test. I'm not that familiar with ACLs, but I suspect that, even though you changed to Unix, there are residual SMB effects.

If you don't have anything in the dataset yet, the easiest thing would be to destroy it and recreate it with all Unix permissions at the start.

If that is a problem, just try creating a test dataset that is Unix from the start, and try the same test.

As a last resort, you might try removing all ACLs with
setfacl -bk
Your output has the 'I' at the end, meaning the ACLs are inherited. You might have to do that setfacl command on both Media and Media/test.

Note that there are two places in the FreeNAS GUI to set permission/share type, and I've never quite understood why. When you're looking at your datasets in the Storage>Volumes pane, and you select your dataset, there is Edit Options > Share Type, and then there is Change Permissions > Permission Type.
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
Well, crap I have 1.5 TB data in the Media share but I have the complete data still on my DroboFS. So I can just copy it over again. It will just take time. I looked under both options for changing permissions and both say Unix and Edit Options > Share Type says Inherits (lz4). Is there a way to reset the whole freenas installation?

EDIT: If I try this as you suggested

[freenasuser@freenas ~]$ setfacl -bk /mnt/freenaspool/Media/test
setfacl: /mnt/freenaspool/Media/test: there are no default entries in NFSv4 ACLs; cannot remove
[freenasuser@freenas ~]$ setfacl -bk /mnt/freenaspool/Media
setfacl: /mnt/freenaspool/Media: there are no default entries in NFSv4 ACLs; cannot remove
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
EDIT: If I try this as you suggested

[freenasuser@freenas ~]$ setfacl -bk /mnt/freenaspool/Media/test
setfacl: /mnt/freenaspool/Media/test: there are no default entries in NFSv4 ACLs; cannot remove
[freenasuser@freenas ~]$ setfacl -bk /mnt/freenaspool/Media
setfacl: /mnt/freenaspool/Media: there are no default entries in NFSv4 ACLs; cannot remove

OK, well that response is about the -k part of the command. The -b part may still have worked. Did you try the chmod command again after that?

I would only destroy the dataset as a last resort. And before doing that you should verify that you can chmod with a new test dataset.
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
OK, well that response is about the -k part of the command. The -b part may still have worked. Did you try the chmod command again after that?

I would only destroy the dataset as a last resort. And before doing that you should verify that you can chmod with a new test dataset.

No chmod still doesn't work even on a new dataset. Same error as before.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I am not sure I understandwhat you mean?
I don't understand either. He can log in no problem. The passphrase is just to unlock the key on his client computer, which works no problem.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Unless you have way to supply the passphrase to the backup program, it won't be able to make the connection.
No, the backup program is logging in. Both the backup program and he manually logging in encounter the same problem. They can't chmod.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
No chmod still doesn't work even on a new dataset. Same error as before.
Interesting. Assuming your new dataset is all unix, it has nothing to do with SMB legacies. Nice to rule that out.

Could you show the directory listing (ls -l) for the root dataset (/mnt/freenaspool) and for Media and Media/test, or for the new dataset you set up?
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
So any other options other than to wipe everything and start over?
Hold on. I'm wondering if the root dataset (/mnt/freenaspool) permissions are messed up. It should belong to root/wheel and have permissions rwx r-xr-x
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
Hold on. I'm wondering if the root dataset (/mnt/freenaspool) permissions are messed up. It should belong to root/wheel and have permissions rwx r-xr-x


[af@andre ~]$ ssh freenasuser@freenas
Enter passphrase for key '/home/af/.ssh/id_rsa':
Last login: Sat Dec 17 18:37:06 2016 from 192.168.0.10
FreeBSD 10.3-STABLE (FreeNAS.amd64) #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 UTC 2016

FreeNAS (c) 2009-2016, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.

For more information, documentation, help or support, go here:
http://freenas.org
Welcome to FreeNAS
[freenasuser@freenas ~]$ /mnt/freenaspool
-bash: /mnt/freenaspool: Is a directory
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool
total 25
drwxrwxr-x+ 9 freenasuser freenasgroup 9 Dec 17 18:40 Media
drwxr-xr-x 3 root wheel 3 Dec 13 20:13 freenasdataset
drwxr-xr-x 7 root wheel 7 Dec 13 20:30 jails
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool/Media
total 155
drwxrwxr-x+ 18 freenasuser freenasgroup 18 Nov 13 09:47 Anime Movies
drwxrwxr-x+ 53 freenasuser freenasgroup 53 Nov 13 14:08 Anime TV Shows
drwxrwxr-x+ 35 freenasuser freenasgroup 35 Nov 13 08:51 Movies
drwxrwxr-x+ 5 freenasuser freenasgroup 6 Nov 13 21:32 Music
drwxrwxr-x+ 34 freenasuser freenasgroup 34 Nov 13 19:46 TV Shows
drwxrwxr-x+ 2 freenasuser freenasgroup 3 Dec 17 18:34 test
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool/Media/test
total 1
-rwxrwxr-x+ 1 freenasuser freenasgroup 4 Dec 17 18:34 a
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211

[af@andre ~]$ ssh freenasuser@freenas
Enter passphrase for key '/home/af/.ssh/id_rsa':
Last login: Sat Dec 17 18:37:06 2016 from 192.168.0.10
FreeBSD 10.3-STABLE (FreeNAS.amd64) #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 UTC 2016

FreeNAS (c) 2009-2016, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.

For more information, documentation, help or support, go here:
http://freenas.org
Welcome to FreeNAS
[freenasuser@freenas ~]$ /mnt/freenaspool
-bash: /mnt/freenaspool: Is a directory
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool
total 25
drwxrwxr-x+ 9 freenasuser freenasgroup 9 Dec 17 18:40 Media
drwxr-xr-x 3 root wheel 3 Dec 13 20:13 freenasdataset
drwxr-xr-x 7 root wheel 7 Dec 13 20:30 jails
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool/Media
total 155
drwxrwxr-x+ 18 freenasuser freenasgroup 18 Nov 13 09:47 Anime Movies
drwxrwxr-x+ 53 freenasuser freenasgroup 53 Nov 13 14:08 Anime TV Shows
drwxrwxr-x+ 35 freenasuser freenasgroup 35 Nov 13 08:51 Movies
drwxrwxr-x+ 5 freenasuser freenasgroup 6 Nov 13 21:32 Music
drwxrwxr-x+ 34 freenasuser freenasgroup 34 Nov 13 19:46 TV Shows
drwxrwxr-x+ 2 freenasuser freenasgroup 3 Dec 17 18:34 test
[freenasuser@freenas ~]$ ls -l /mnt/freenaspool/Media/test
total 1
-rwxrwxr-x+ 1 freenasuser freenasgroup 4 Dec 17 18:34 a
Sorry, should have asked for ls -la so I could see the root dataset permissions too. Or you could just ls -la /mnt.

You see the + after the permissions of Media and all the directories in it? That indicates the presence of ACLs. Apparently the setfacl command did not get rid of them completely. When you made the new dataset to see if you could chmod, did it have a + also?
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108

[af@andre ~]$ ssh freenasuser@freenas
Enter passphrase for key '/home/af/.ssh/id_rsa':
Last login: Sat Dec 17 20:16:45 2016 from 192.168.0.10
FreeBSD 10.3-STABLE (FreeNAS.amd64) #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 UTC 2016

FreeNAS (c) 2009-2016, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.

For more information, documentation, help or support, go here:
http://freenas.org
Welcome to FreeNAS
[freenasuser@freenas ~]$ ls -la /mnt/freenaspool
total 29
drwxr-xr-x 5 root wheel 5 Dec 13 20:05 .
drwxr-xr-x 3 root wheel 128 Dec 16 22:52 ..
drwxrwxr-x+ 9 freenasuser freenasgroup 9 Dec 17 18:40 Media
drwxr-xr-x 3 root wheel 3 Dec 13 20:13 freenasdataset
drwxr-xr-x 7 root wheel 7 Dec 13 20:30 jails
[freenasuser@freenas ~]$ ls -la /mnt/freenaspool/Media
total 167
drwxrwxr-x+ 9 freenasuser freenasgroup 9 Dec 17 18:40 .
drwxr-xr-x 5 root wheel 5 Dec 13 20:05 ..
drwxrwxr-x+ 18 freenasuser freenasgroup 18 Nov 13 09:47 Anime Movies
drwxrwxr-x+ 53 freenasuser freenasgroup 53 Nov 13 14:08 Anime TV Shows
drwxrwxr-x+ 35 freenasuser freenasgroup 35 Nov 13 08:51 Movies
drwxrwxr-x+ 5 freenasuser freenasgroup 6 Nov 13 21:32 Music
drwxrwxr-x+ 34 freenasuser freenasgroup 34 Nov 13 19:46 TV Shows
drwxrwxr-x+ 6 freenasuser freenasgroup 6 Nov 12 23:12 XXX
drwxrwxr-x+ 2 freenasuser freenasgroup 3 Dec 17 18:34 test
[freenasuser@freenas ~]$ ls -la /mnt/freenaspool/Media/test
total 13
drwxrwxr-x+ 2 freenasuser freenasgroup 3 Dec 17 18:34 .
drwxrwxr-x+ 9 freenasuser freenasgroup 9 Dec 17 18:40 ..
-rwxrwxr-x+ 1 freenasuser freenasgroup 4 Dec 17 18:34 a
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
I just made a complete fresh test dataset in my frenaspool via the gui and here is ls -la output


[freenasuser@freenas /mnt/freenaspool]$ ls -la /mnt/freenaspool/test1
total 13
drwxr-xr-x 2 root wheel 2 Dec 17 20:48 .
drwxr-xr-x 6 root wheel 6 Dec 17 20:48 ..
[freenasuser@freenas /mnt/freenaspool]$
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I just made a complete fresh test dataset in my frenaspool via the gui and here is ls -la output


[freenasuser@freenas /mnt/freenaspool]$ ls -la /mnt/freenaspool/test1
total 13
drwxr-xr-x 2 root wheel 2 Dec 17 20:48 .
drwxr-xr-x 6 root wheel 6 Dec 17 20:48 ..
[freenasuser@freenas /mnt/freenaspool]$
OK, so the root dataset permissions seem correct and don't have ACLs. The new dataset you made (test1) though belongs to root. You won't be able to change permissions in it unless you do it as superuser. You should assign ownership of test1 to you, then create a file in it and try to chmod it as before.
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
Well that seem to work.


[af@andre ~]$ ssh freenasuser@freenas
Enter passphrase for key '/home/af/.ssh/id_rsa':
Last login: Sat Dec 17 21:04:12 2016 from 192.168.0.10
FreeBSD 10.3-STABLE (FreeNAS.amd64) #0 r295946+07c41cd(9.10-STABLE): Wed Nov 9 00:19:25 UTC 2016

FreeNAS (c) 2009-2016, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.

For more information, documentation, help or support, go here:
http://freenas.org
Welcome to FreeNAS
[freenasuser@freenas ~]$ echo "foo" > /mnt/freenaspool/test1/a
[freenasuser@freenas ~]$ chmod u+rw /mnt/freenaspool/test1/a
 

André Fettouhi

Contributor
Joined
Nov 12, 2016
Messages
108
I just tried to test backintime with the new dataset I created and now it works. So how to fix this mess I made? Should I just scratch everything? I need a smb share for all my media stuff. Should I then make separate dataset outside that smb share where my ssh resides along with my freenasusers home directory and then a separate dataset for my backup from my linux box? Or should I just combine these two?
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I just tried to test backintime with the new dataset I created and now it works. So how to fix this mess I made? Should I just scratch everything? I need a smb share for all my media stuff. Should I then make separate dataset outside that smb share where my ssh resides along with my freenasusers home directory and then a separate dataset for my backup from my linux box? Or should I just combine these two?
 
Status
Not open for further replies.
Top