Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
haryisharry opened this issue Oct 14, 2024 · 1 comment
Open
3 tasks done

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

haryisharry opened this issue Oct 14, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@haryisharry
Copy link

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

  • This issue is not a duplicate of an existing documentation change request.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@haryisharry haryisharry added the documentation Improvements or additions to documentation label Oct 14, 2024
@AnonymousWP AnonymousWP self-assigned this Oct 14, 2024
@psyray
Copy link
Contributor

psyray commented Oct 14, 2024

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"
  1. 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"
  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants