Security-Tools-Alliance / rengine-ng

reNgine-ng is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface.
GNU General Public License v3.0
55 stars 11 forks source link

docs(scope): Add troubleshooting part in setup guide #218

Open haryisharry opened 3 days ago

haryisharry commented 3 days ago

Describe the documentation you want to change

For new user sometime setup script not work as description. So in the guideline of installing should have some troubleshooting cases. For eg:

celery-1 | Error: Invalid value for '-A' / '--app': celery-1 | Unable to load celery application. celery-1 | While trying to load the module reNgine.tasks the following error occurred: celery-1 | Traceback (most recent call last): celery-1 | File "/home/rengine/rengine/reNgine/init.py", line 22, in first_run celery-1 | secret = open(secret_file, 'w') celery-1 | PermissionError: [Errno 13] Permission denied: '/home/rengine/rengine/secret'

Fix steps:

docker exec -it --user root rengine-celery-1 /bin/bash chown -R rengine:rengine /home/rengine/rengine exit docker restart rengine-celery-1

Acknowledgements

psyray commented 2 days ago

Thanks for report, it's a known issue when upgrading from reNgine-ng 2.0.7 to 2.1.0 or if you come from rengine. Here's the full steps to upgrade

Testing reNgine-ng 2.1.0

reNgine-ng Upgrade from 2.0.7 to 2.1.0

  1. make a backup of you .env file
  2. git checkout release/2.1.0
  3. git pull origin release/2.1.0
  4. copy .env-dist to .env and modify certificate/postgres credentials (do not copy/paste .env)
  5. sudo ./install.sh
  6. After upgrade, change volume permissions
    sudo docker run --rm -v rengine_tool_config:/data alpine sh -c "chown -R 1000:1000 /data"
    sudo docker run --rm -v rengine_nuclei_templates:/data alpine sh -c "chown -R 1000:1000 /data"
    sudo docker run --rm -v rengine_scan_results:/data alpine sh -c "chown -R 1000:1000 /data"
    sudo docker run --rm -v rengine_wordlist:/data alpine sh -c "chown -R 1000:1000 /data"
  7. check permissions inside volume, it should be 1000:1000
    sudo docker run --rm -v rengine_tool_config:/data alpine sh -c "ls -lh /data"
    sudo docker run --rm -v rengine_nuclei_templates:/data alpine sh -c "ls -lh /data"
    sudo docker run --rm -v rengine_scan_results:/data alpine sh -c "ls -lh /data"
    sudo docker run --rm -v rengine_wordlist:/data alpine sh -c "ls -lh /data"
  8. make up

Tested and working

With 2.1.0, docker containers are unprivileged and rengine-ng app is run under rengine user instead of root. When you do an upgrade, docker volume exists and still have the root permission because they have been created when container was privileged and app run under root user. So permission change is mandatory for rengine to work

I will add the volume permission change to the install script