SOLVED Can't change permissions on dataset, and another weird issue

Status
Not open for further replies.

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
So, I've got a striped volume set up for my non essential stuff (ie media for plex) and I'm unable to change the permissions on one dataset, either via the GUI, or shell.

I just get this, spammed in my log, for every single file and folder in the dataset.
Code:
Jan 19 13:03:12 freenas notifier: chmod: /mnt/non_essential/videos: Operation not permitted


Here's the current setup.

8gPzQGH.png



I'm trying to change permissions because I've got a weird issue where in an NFS share (using mapall andrew:wheel) I try to copy a file into the share but get an error.
Code:
Error opening file '/mnt/videos/TechnicLauncher.jar': Operation not permitted

But it still copies the file, just at 0 bytes. Then, if I try to copy the file again, it asks if I want to overwrite, and if I select 'yes' it'll copy successfully. So, obviously it's some kind of permissions issue, but I don't understand what.... I'm contemplating getting another hard drive so I can copy the 2.1TB of videos out of the dataset, destroy it, and recreate it. But that's a ton of work.

Also, as of a couple days ago, using SSH, I cannot cp a file into the dataset without sudo.

I have no idea where to start with this. All of my other datasets and shares have no issues at all... Just this one. And of course it's the largest one, lol.

Any input would be great! TIA
 
D

dlavigne

Guest
Does running ls -l from shell show andrew/wheel as the owner? Do you get the same error if you try to set permissions from shell (which runs as root)?
 

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
Does running ls -l from shell show andrew/wheel as the owner? Do you get the same error if you try to set permissions from shell (which runs as root)?
Yes and yes. I tried chmod -R 777 /mnt/non_essential/videos from shell and get the same Operation not permitted error, which blows my mind, lol. Root should be able to do anything! lol

//edit// Just ran a chown -R andrew:andrew /mnt/non_essential/videos and that ran fine, so it's just chmod that doesn't work.
 
D

dlavigne

Guest
There are things that restrict root. It might be the schg system flag (check with ls -lo) or a dataset property (check with zfs get all datasetname).
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That + symbol means there are acls and chmod won't work. Remove the acl using setfacl and things will be fixed.
 

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
That + symbol means there are acls and chmod won't work. Remove the acl using setfacl and things will be fixed.
Hot damn, I got the + to be removed! But still can't chmod. For some reason setfacl -bR /mnt/non_essential/videos keeps kicking back as -R being an illegal flag. I even tried breaking them up as -b -R but still won't work.

Code:
[root@freenas ~]# setfacl -bR /mnt/non_essential/videos/                       
setfacl: illegal option -- R                                                   
usage: setfacl [-bdhkn] [-a position entries] [-m entries] [-M file] [-x entries] [-X file] [file ...]                                   
[root@freenas ~]#


I'm going off this: http://linuxcommand.org/man_pages/setfacl1.html
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Yes I think so. Test it out on a small sample before running it in the entire dataset
 

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
Yes I think so. Test it out on a small sample before running it in the entire dataset
Code:
[root@freenas ~]# find /mnt/non_essential/videos/ -type d -exec setfacl -b
find: -exec: no terminating ";" or "+"
[root@freenas ~]# find /mnt/non_essential/videos/ -type d -exec setfacl -b;
find: -exec: no terminating ";" or "+"
[root@freenas ~]#
 

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
Got it.

find /mnt/non_essential/videos/ -type d -exec setfacl -b {} +

Now, when I get home I'll see if it fixed my file copying issue. I'm in class right now, lol.

Thanks for the help!
 

my95z34

Explorer
Joined
Oct 25, 2014
Messages
51
Everything seems to work properly now! I can copy files into the dataset without issues. I wonder if when I created it, I did so as a Windows dataset.... I don't remember, lol.

Either way, thank you both for your help!
 
Joined
Jan 9, 2015
Messages
430
That + symbol means there are acls and chmod won't work. Remove the acl using setfacl and things will be fixed.
Thanks for the help @SweetAndLow, I had the same problem and it is all fixed now.
 

CasualRambo

Cadet
Joined
Apr 2, 2017
Messages
3
Got it.

find /mnt/non_essential/videos/ -type d -exec setfacl -b {} +

Now, when I get home I'll see if it fixed my file copying issue. I'm in class right now, lol.

Thanks for the help!

This works just for folders, the files inside retain the "+". How can I remove ACL from every folder AND file?
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
Last edited:

Neobright

Cadet
Joined
Mar 6, 2017
Messages
8
Thanks - this sorted out my problem too, accidently set up a windows rather than nfs share to begin with which then restricted chmod
 
Status
Not open for further replies.
Top