Operation not permitted

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
I don't understand what crapped out or why. Was working a couple days ago and went to re-install plex because things wouldn't configure right and started getting errors. Clearly removing it didn't remove the error. I'm still getting the same code.

Thanks

Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_plugin.py", line 646, in fetch_plugin_index
self.__clone_repo(git_server, git_working_dir)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_plugin.py", line 1222, in __clone_repo
porcelain.pull(destination, repo_url, errstream=devnull)
File "/usr/local/lib/python3.6/site-packages/dulwich/porcelain.py", line 826, in pull
r.reset_index(tree=tree)
File "/usr/local/lib/python3.6/site-packages/dulwich/repo.py", line 950, in reset_index
validate_path_element=validate_path_element)
File "/usr/local/lib/python3.6/site-packages/dulwich/index.py", line 530, in build_index_from_tree
obj, entry.mode, full_path, honor_filemode=honor_filemode)
File "/usr/local/lib/python3.6/site-packages/dulwich/index.py", line 460, in build_file_from_blob
os.chmod(target_path, mode)
PermissionError: [Errno 1] Operation not permitted: b'/mnt/storage/iocage/.plugin_index/backuppc.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 461, in list_resource
header=False)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 911, in fetch
icon=True, official=official)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_plugin.py", line 653, in fetch_plugin_index
_callback=self.callback)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 81, in logit
_callback(content, exception)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
raise callback_exception(message)
RuntimeError: [Errno 1] Operation not permitted: b'/mnt/storage/iocage/.plugin_index/backuppc.json'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 161, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1109, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1046, in _call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1073, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1004, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 989, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: [Errno 1] Operation not permitted: b'/mnt/storage/iocage/.plugin_index/backuppc.json'
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
What version of FreeNAS?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
Will that bug report provide a fix or do I need to reinstall everything from the ground up?

Obviously I'm doing a report now so that it can be fixed, I just want to know what to do going forward.
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
Also would it best a Jail or Plugin error or maybe something else?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Will that bug report provide a fix or do I need to reinstall everything from the ground up?

Obviously I'm doing a report now so that it can be fixed, I just want to know what to do going forward.
Once the developers have a look at this, they may be able to give you some guidance with that, but I can't say for sure.
I have been in the situation under warden jails (the old system) where I did need to reinstall FreeNAS, import the pool and then reinstall Plex. In that case I had to delete the dataset that I used for my jails and create a new dataset, reinstall the Plex jail and reconnect it to the media directory on the storage pool.
 
Joined
Jul 10, 2016
Messages
521
Can you post the output of the command ls -la /mnt/storage/iocage/.plugin_index/ between code tags?

Did you happen to share the iocage dataset (or your whole pool) and/or change the share type from Unix to Windows?
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
How do I copy and paste it from the gui or direct it to export to a file maybe? Or should I just screenshot and attach?
 
Joined
Jul 10, 2016
Messages
521
A screenshot will do. In the long run, install a real terminal client such as PuTTY if you're using Windows, as the built-in terminal is very limited.
The beginning should look as follows.

Code:
total 223
drwxr-xr-x  5 root  wheel     45 Dec  7 19:59 .
drwxr-xr-x  9 root  wheel     10 Dec 22 01:05 ..
drwxr-xr-x  8 root  wheel     14 Jan 18 21:44 .git
-rw-r--r--  1 root  wheel    810 Jan 18 21:44 asigra-11.1.json
-rw-r--r--  1 root  wheel    819 Jan 18 21:44 asigra.json
-rw-r--r--  1 root  wheel    449 Jan 18 21:44 backuppc.json
-rw-r--r--  1 root  wheel    519 Jan 18 21:44 bacula-server.json
-rw-r--r--  1 root  wheel    408 Jan 18 21:44 bru-server.json
-rw-r--r--  1 root  wheel    422 Nov 25 21:07 btsync.json
-rw-r--r--  1 root  wheel    466 Jan 18 21:44 channels-dvr.json


The key is that there should not be plus sign at the end of the permissions column, e.g:
Code:
-rw-r--r--+  1 root  wheel    449 Jan 18 21:44 backuppc.json
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
putty keeps being refused I'll figure that out more after posting these

freenas.JPG
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
I had them all under my user account and swapped to nobody/nogroup in case my settings got wrong
 
Joined
Jul 10, 2016
Messages
521
For PuTTy access, note that by default the SSH service doesn't allow root access. The safest thing to do, is to create yourself a regular user (in the wheel group) and use that to protect you from your own enthusiasm. :)

Yeah, as I suspected, the screenshot indicates that somehow ACL permissions got attached to the plugins folder. A vanilla setup doesn't have this, and that is exactely what's causing the Traceback error RuntimeError: [Errno 1] Operation not permitted: b'/mnt/storage/iocage/.plugin_index/backuppc.json' as the ACL are preventing iocage from updating the plugins.

Changing the owner to nobody:nogroup won't fix this. Also, the iocage dataset is part of the data pool, so reinstalling FreeNAS won't do any good either.

I can only conclude this is self-inflicted and not a FreeNAS bug. At this point, it's impossible to know what other permissions were changed. Changing permissions and/or ownership of random files in the jail datasets are discouraged as this is likely to break the jail and may explain the issues you're having with plex.

At this point, you may want to delete that iocage dataset and recreate your jail(s) from scratch. Avoid sharing your entire pool or the iocage dataset; you can "mount storage" to add a specific folder to your jail (and just share that) or use WinSCP to move files between Windows and FreeNAS.
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
Thanks! That seems to have things back on the right track at least... until I break it again...

Shame it is taking forever for plex to build the library. Windows was much faster, I'm going to poke around to see if I'm missing something there.

Thanks
 

Kazuma

Dabbler
Joined
Jan 27, 2019
Messages
20
Now it says site can't be reached after doing a restart.... Going to delete and start that jail over again. I'm dinking something up lol

PS, where would the right place be to run a thread while I work through these hurdles so that people can search them and not clutter the forum? I'm bunk at understanding guides that aren't physical (autism thing I think) but I don't want to look like a nuisance while I learn this. Thanks
 
Last edited:
Top