Strange file permissions: 000

BlueNGray

Dabbler
Joined
Nov 27, 2019
Messages
12
I've recently started getting files and directories created with all permissions disabled. For example:

Code:
me@myhost:~$ ls >foo
me@myhost:~$ ls -l foo
----------+ 1 me  me  277 Apr 10 23:59 foo



I also notice that my .bash_history file gets created with those permissions. Doing the same sort of things from a root login, this does not happen. My umask is 0022, so I know that's not it. The filesystem is a Unix share, so I don't think there's any CIFS nonsense getting in the way.

I have a feeling it's probably something simple that is staring me in the face, but I can't see it.

Suggestions?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I've recently started getting files and directories created with all permissions disabled. For example:

Code:
me@myhost:~$ ls >foo
me@myhost:~$ ls -l foo
----------+ 1 me  me  277 Apr 10 23:59 foo



I also notice that my .bash_history file gets created with those permissions. Doing the same sort of things from a root login, this does not happen. My umask is 0022, so I know that's not it. The filesystem is a Unix share, so I don't think there's any CIFS nonsense getting in the way.

I have a feeling it's probably something simple that is staring me in the face, but I can't see it.

Suggestions?
Looks like an ACL was set on the parent directory with no inheriting permissions defined. U2 added some extra validation in the ACL manager to prevent this from happening. Go into the ACL manager for the dataset, check the "strip ACL" and "recursive" checkboxes and click apply.
 

BlueNGray

Dabbler
Joined
Nov 27, 2019
Messages
12
Thanks @anodos, this fixed the problem, but I did have to go in and recursively change the owner in that dataset, because it set everything to root:wheel when I did this. Not a big problem, because it was all my stuff anyway.

It also left me wondering about the ACL settings for my 'home' dataset. All of the entries (owner@, group@, everyone@) have the permission type set to "Advanced". Going through your reference to SMB Permissions Overview link, it makes me think they should be set to 'Basic', since this is a dataset that will not be a Windows share. (I have other datasets I use for Windows shares.)

I also found the behavior of the Advanced check box at the bottom of the ACL editor page a little concerning. Initially, the 'Strip ACLs' box was greyed out. When I checked the box for "Apply permissions recursively", the "Strip ACLs" box became un-greyed, and a third box appeared about child datasets, which I also checked.

Side note: Ever since I first installed FreeNAS, i feel that I'm using a sledge hammer to install a finishing nail. This is a home server that I use to provide a local "cloud" for one person: me. My wife doesn't use a computer any more (she's happy with her Android tablet and smartphone) and has no need (or interest) in the server's capabilities. In addition to the FreeNAS server, I have one FreeBSD machine, one Linux laptop, and one Wndows laptop, and a networked printer. I run a PLEX server in a jail for photo and media backup and a TV tuner card. I don't run any virtual machines (at least not yet), and for remote access, I have a OpenVPN set up on my home router, so I don't need to run a VPN on my FreeNAS machine. I installed FreeNAS last December, replacing a FreeBSD box I was using for all the same purposes, thinking that setting up FreeNAS would encapsulate my sysadmin needs for the server behind a clean user interface, which it has. But the nuances and hidden 'gotcha's behind what FreeNAS hides behind the scenes have bit me (hard) on several occasions. This exercise being one. Ah, well. You live and learn.

Thanks again for your tip.
 
Top