chmod operation not permitted

Status
Not open for further replies.

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
I have a few files that somehow the permissions got changed around locally on freenas. So the owner of the files can not longer write. -r-xrwxr-x+

I am logged in as the local root user, and I am attempting to change the files permissions.
I have run this command
chmod 776 -R Folername
however I get a return of operation not permitted for every file in the folder.
I have also tried
chmod 1776 -R Foldername
With the same result.

I can do basically everything else rm filename and chown -R root Foldername

I am sure it is something really simple I am missing but I can't figure it out.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Try disabling the CIFS service (or NFS or AFP, whatever you're using).
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
Try disabling the CIFS service (or NFS or AFP, whatever you're using).


I disabled all services, and shutdown all of the Jails (some have access to that particular folder via the storage option in the Jail tab)
But I still receive operation not permitted.

I also rebooted freenas just for good measure. But it didn't help.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
ZFS aclmode property of your dataset is set to 'restricted'. This probably happened because you configured it to have 'Windows' permissions. Chmod tends to break nfsv4 acls hence it is disallowed.

If you absolutely must use chmod on the dataset, you can set the ZFS aclmode property to 'passthrough'. See ZFS manpage for syntax.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can also modify the permissions using the windows security GUI.
 

Catsrules

Dabbler
Joined
Jan 7, 2015
Messages
33
ZFS aclmode property of your dataset is set to 'restricted'. This probably happened because you configured it to have 'Windows' permissions. Chmod tends to break nfsv4 acls hence it is disallowed.

If you absolutely must use chmod on the dataset, you can set the ZFS aclmode property to 'passthrough'. See ZFS manpage for syntax.

Yep that was it. I disabled the windows permission then reset all permissions then turned windows permission back on. I had to reset up all permission but that wasn't to bad.

Thanks for your help

You can also modify the permissions using the windows security GUI.

I have tried this but for some reason it did not work. And according to the windows security GUI the owner user already had full control when in fact it only had read access.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
How can the owner be limited to read-only? The easy fix for that is the GUI option to apply sane defaults.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
Yep that was it. I disabled the windows permission then reset all permissions then turned windows permission back on. I had to reset up all permission but that wasn't to bad.

Thanks for your help


I have tried this but for some reason it did not work. And according to the windows security GUI the owner user already had full control when in fact it only had read access.

When I tried to access owncloud in my browser, I got the following error message:
owncloud_error.png

And I'm getting same type of error when using chmod. See below:

root@customplugin_1:/ # chmod 770 -R /media
chmod: -R: No such file or directory
chmod: /media: Operation not permitted

I've tried disabling in windows GUI with no success. Got the same error "user already had full control".

I followed the above instruction by disabling and resetting windows permission but same result.

Please help!
 
Last edited:

ric

Contributor
Joined
Dec 22, 2013
Messages
180
ZFS aclmode property of your dataset is set to 'restricted'. This probably happened because you configured it to have 'Windows' permissions. Chmod tends to break nfsv4 acls hence it is disallowed.

If you absolutely must use chmod on the dataset, you can set the ZFS aclmode property to 'passthrough'. See ZFS manpage for syntax.
I cant seem to find the syntax on how to set the ZFS aclmode property to 'passthrough', Can you please help? Thanks
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
I cant seem to find the syntax on how to set the ZFS aclmode property to 'passthrough', Can you please help? Thanks

The proper way to achieve this through the GUI is to change the dataset permissions type to "UNIX" with the caveat that you shouldn't do this on samba shares (unless you have good reason to do so).
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
In addition to 'chmod: Operation not permitted' , I'm unable to change the dataset permission from GUI under Unix > other, I tried to uncheck both Read & Write and hit Change, but nothing happened.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,543
In addition to 'chmod: Operation not permitted' , I also have problem changing the dataset permission from GUI, doesn't allow me to make any changes.

Please create new forum thread describing your problem in detail. Include whether you are trying to share the directory through owncloud and samba simultaneously, and how your media directory is mounted into your owncloud jail.
 
Status
Not open for further replies.
Top