packing-box / docker-packing-box

Docker image gathering packers and tools for making datasets of packed executables and training machine learning models for packing detection
GNU General Public License v3.0
49 stars 10 forks source link

`FileNotFoundError` after using `pbox-update` #13

Closed smarbal closed 2 years ago

smarbal commented 2 years ago

After running the pbox-update command, any other command produces this error :

dataset list
Traceback (most recent call last):
  File "/opt/tools/dataset", line 3, in <module>
    from pbox import *
  File "/usr/local/lib/python3.8/dist-packages/pbox/__init__.py", line 4, in <module>
    from .items import *
  File "/usr/local/lib/python3.8/dist-packages/pbox/items/__init__.py", line 2, in <module>
    from .analyzer import *
  File "/usr/local/lib/python3.8/dist-packages/pbox/items/analyzer.py", line 33, in <module>
    Analyzer.source = None
  File "/usr/local/lib/python3.8/dist-packages/pbox/common/item.py", line 60, in source
    with p.open() as f:
  File "/usr/local/lib/python3.8/dist-packages/pathlib2/__init__.py", line 1548, in open
    return io.open(
  File "/usr/local/lib/python3.8/dist-packages/pathlib2/__init__.py", line 1383, in _opener
    return self._accessor.open(self, flags, mode)
  File "/usr/local/lib/python3.8/dist-packages/pathlib2/__init__.py", line 646, in wrapped
    return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: '/root/.opt/analyzers.yml'
dhondta commented 2 years ago

Hi @smarbal ! I made some changes to the Dockerfile recently to move the root user to a normal one. As a consequence, every source file copied to /opt was now moved to ~/.opt. In this case, you probably use the first version of the Dockerfile after these changes, which has still some issues I'm currently trying to fix. Stay tuned, I will keep you posted when I update the Dockerfile so that you can rebuild your box.

dhondta commented 2 years ago

The Dockerfile was now refactored to use a dedicated user instead of root and the paths to the configuration YAML files were fixed.