#Permission sentry/entrypoint.sh on RHEL 8.6

9 messages · Page 1 of 1 (latest)

tidal owl
#

i got error for permission this, then i already give permission chmod +x in sentry/entrypoint.sh and cron/entrypoint

by reference this https://github.com/getsentry/self-hosted/issues/3633.

but still issue not solve. my OS is RHEL 8.6 and i already set PERMISSIVE on SELinux (setenforce 0)

GitHub

Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept - Issues · getsentry/self-hosted

bleak vineBOT
#

Hi @tidal owl. I'm happy to dig into this for you! I'll check my internal sources for answers to your question! :wave:

#

Based on the knowledge sources, it appears you're experiencing a permission issue with Sentry's entrypoint scripts during installation or operation on RHEL 8.6.

This is a common issue with self-hosted Sentry installations, and several similar cases have been documented. The problem often extends beyond just making the scripts executable with chmod +x.

From the information provided, there are several potential solutions you could try:

  1. Check ownership of files: In some cases, files in /etc/sentry have incorrect ownership. For example, one user found that files had UID/GID 1006 which didn't exist in /etc/passwd while the Sentry user had UID/GID 999 Permission denied for sentry.conf.py.

  2. Adjust permissions more broadly: Several users have resolved similar issues by applying broader permissions:

    chmod 777 /opt/sentry
    chmod 777 /opt/sentry/sentry/postgres/init_hba.sh 
    chmod 777 /opt/sentry/sentry/postgres/postgres-entrypoint.sh
    chmod 777 /opt/sentry/sentry/sentry/entrypoint.sh
    
  3. Check all script files: Make sure all shell scripts are executable:

    find $SENTRY_FOLDER -type f -name "*.sh" | xargs chmod a+x
    
  4. Make directories traversable: Ensure all directories are accessible:

    find $SENTRY_FOLDER -type d | xargs chmod a+x
    
  5. Check config file permissions: Some users found that config.yml with chmod 600 permissions caused issues and changing to chmod 644 fixed it install/set-up-and-migrate-database.sh:source:13 error.

Since you've already disabled SELinux temporarily with setenforce 0, that eliminates one potential cause. However, the permission issues might be more complex than just making the scripts executable.

#

If the above solutions don't work, you might need to investigate the specific error message you're receiving to pinpoint the exact permission issue.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@tidal owl Our robots are still learning and improving, please let us know if this response was correct by reacting below.

tidal owl
# bleak vine If the above solutions don't work, you might need to investigate the specific er...

@bleak vine i already do,
here error still show:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/etc/sentry/entrypoint.sh": permission denied: unknown
Error in install/set-up-and-migrate-database.sh:14.
'$dcr web shell -c "
from django.db import connection

with connection.cursor() as cursor:
cursor.execute('ALTER TABLE IF EXISTS sentry_groupedmessage DROP CONSTRAINT IF EXISTS sentry_groupedmessage_project_id_id_515aaa7e_uniq;')
cursor.execute('DROP INDEX IF EXISTS sentry_groupedmessage_project_id_id_515aaa7e_uniq;')
"' exited with status 1
-> install.sh:main:36
--> install/set-up-and-migrate-database.sh:source:14

bleak vineBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Based on your error message, you're still experiencing permission issues with the /etc/sentry/entrypoint.sh script during the Sentry installation process. This is a common issue with self-hosted Sentry installations on RHEL systems.

Looking at similar issues in the knowledge sources, there are a few more specific approaches you could try:

  1. Check the actual location of entrypoint.sh: The installation mounts the sentry folder to /etc/sentry in the container. Make sure the permissions are correct on both the host and in the container:

    chmod 777 sentry/entrypoint.sh
    
  2. Try a more comprehensive permission fix: Some users have reported success with a more thorough approach:

    chmod 777 self-hosted
    cd self-hosted
    chmod 777 postgres/postgres-entrypoint.sh
    chmod 777 postgres/init_hba.sh
    chmod 777 sentry/entrypoint.sh
    
  3. Reset and try again: If this is a new installation, you could try running:

    ./reset.sh
    

    Then remove all volumes and run ./install.sh again as mentioned in Error response from daemon: failed to create shim task.

  4. Check all script files and directories: Make sure all shell scripts are executable and all directories are traversable:

    find . -type f -name "*.sh" | xargs chmod a+x
    find . -type d | xargs chmod a+x
    

The error specifically indicates that the container process can't execute /etc/sentry/entrypoint.sh due to permission issues. This could be related to how Docker mounts volumes and handles permissions between the host and container.

#

If these solutions don't work, you might need to investigate if there are any specific Docker configuration issues on your RHEL 8.6 system that could be affecting how permissions are handled when mounting volumes.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: