GovReady / govready-q

An open source, self-service GRC tool to automate security assessments and compliance.
https://q.govready.com
Other
179 stars 55 forks source link

/usr/src/app/dev_env/docker/remote_interpreter/python_env.sh needs execute permissions in Docker container #1694

Closed gregelin closed 2 years ago

gregelin commented 3 years ago

Describe the bug as a Story The directions for setting python interpreter are failing in PyCharm.

Attempting to set PyCharm Python interpreter to /usr/src/app/dev_env/docker/remote_interpreter/python_env.sh; fails with error permission denied even though user is root because the permissions on /usr/src/app/dev_env/docker/remote_interpreter/python_env.share set to-rw-r--r-on the docker image after runningpython run.py dev_env. The file permissions forpython_env.shin the host and repo are-rwxr-xr-x`. So permissions need to be updated on during deployment.

To Reproduce Steps to reproduce the behavior:

  1. Launch GovReady-Q using dev_env
  2. Exec into container: docker exec -it govready_q_dev /bin/bash
  3. Try to execute python: /usr/src/app/dev_env/docker/remote_interpreter/python_env.sh
  4. See error: bash: /usr/src/app/dev_env/docker/remote_interpreter/python_env.sh: Permission denied

Expected behavior Running /usr/src/app/dev_env/docker/remote_interpreter/python_env.sh takes you to Python shell prompt.

Screenshots

image

Developer hints

Please also update documentation to tell people to set IDE to not upload files to HOST.

Acceptance criteria

GIVEN this user starts containers using python run.py dev_env WHEN I do this I try to run the interpreter. THEN this python interpreter is used.

gregelin commented 3 years ago

Looks like the permissions were incorrectly set in the repository. Issue should be fixed with merge of #1695.