gamelaster / opensupports-docker

Docker container for OpenSupports
14 stars 6 forks source link

DB Permission issue #7

Open tstill88 opened 1 year ago

tstill88 commented 1 year ago

The pre-install checks were all green but im not able to create tickets as admin or a user. i can sign up but when i login nothing works.

On the admin page if i go to the users page i get a red banner "An error occurred while trying to retrieve users."

I did try delete and retrying but same results.

gamelaster commented 1 year ago

This is strange. I used the docker container two months ago, and everything worked well. You are using same sample docker compose from repo?

tstill88 commented 1 year ago

Yeah im using the docker compose file. MariaDB Logs below (not sure why its showing up here with a strikethrough on some lines)

2023-05-09 20:48:11+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.2+maria~ubu2204 started. 2023-05-09 20:48:11+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2023-05-09 20:48:11+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.2+maria~ubu2204 started. 2023-05-09 20:48:11+00:00 [Note] [Entrypoint]: Initializing database files PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! To do so, start the server, then issue the following command: '/usr/bin/mariadb-secure-installation' which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the MariaDB Knowledgebase at https://mariadb.com/kb Please report any problems at https://mariadb.org/jira The latest information about MariaDB is available at https://mariadb.org/. Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved/ 2023-05-09 20:48:21+00:00 [Note] [Entrypoint]: Database files initialized 2023-05-09 20:48:21+00:00 [Note] [Entrypoint]: Starting temporary server 2023-05-09 20:48:21+00:00 [Note] [Entrypoint]: Waiting for server startup 2023-05-09 20:48:21 0 [Note] Starting MariaDB 10.11.2-MariaDB-1:10.11.2+maria~ubu2204 source revision cafba8761af55ae16cc69c9b53a341340a845b36 as process 97 2023-05-09 20:48:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2023-05-09 20:48:21 0 [Note] InnoDB: Number of transaction pools: 1 2023-05-09 20:48:21 0 [Note] InnoDB: Using generic crc32 instructions 2023-05-09 20:48:21 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-05-09 20:48:21 0 [Note] InnoDB: Using liburing 2023-05-09 20:48:21 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB 2023-05-09 20:48:21 0 [Note] InnoDB: Completed initialization of buffer pool 2023-05-09 20:48:21 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) 2023-05-09 20:48:22 0 [Note] InnoDB: 128 rollback segments are active. 2023-05-09 20:48:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... 2023-05-09 20:48:22 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. 2023-05-09 20:48:22 0 [Note] InnoDB: log sequence number 46456; transaction id 14 2023-05-09 20:48:22 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-05-09 20:48:22 0 [Warning] 'user' entry 'root@3adbd592feb6' ignored in --skip-name-resolve mode. 2023-05-09 20:48:22 0 [Warning] 'proxies_priv' entry '@% root@3adbd592feb6' ignored in --skip-name-resolve mode. 2023-05-09 20:48:22 0 [Note] mariadbd: ready for connections. Version: '10.11.2-MariaDB-1:10.11.2+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution 2023-05-09 20:48:22+00:00 [Note] [Entrypoint]: Temporary server started. 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: GENERATED ROOT PASSWORD: 0})$dn(w>T>9YaD#S8j(:g(jm%6(mV^] 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Creating database opensupports 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Creating user opensupports 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Giving user opensupports access to schema opensupports 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation) 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Stopping temporary server 2023-05-09 20:48:25 0 [Note] mariadbd (initiated by: unknown): Normal shutdown 2023-05-09 20:48:25 0 [Note] InnoDB: FTS optimize thread exiting. 2023-05-09 20:48:25 0 [Note] InnoDB: Starting shutdown... 2023-05-09 20:48:25 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool 2023-05-09 20:48:25 0 [Note] InnoDB: Buffer pool(s) dump completed at 230509 20:48:25 2023-05-09 20:48:25 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1" 2023-05-09 20:48:25 0 [Note] InnoDB: Shutdown completed; log sequence number 46456; transaction id 15 2023-05-09 20:48:25 0 [Note] mariadbd: Shutdown complete 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: Temporary server stopped 2023-05-09 20:48:25+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up. 2023-05-09 20:48:25 0 [Note] Starting MariaDB 10.11.2-MariaDB-1:10.11.2+maria~ubu2204 source revision cafba8761af55ae16cc69c9b53a341340a845b36 as process 1 2023-05-09 20:48:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2023-05-09 20:48:25 0 [Note] InnoDB: Number of transaction pools: 1 2023-05-09 20:48:25 0 [Note] InnoDB: Using generic crc32 instructions 2023-05-09 20:48:25 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-05-09 20:48:25 0 [Note] InnoDB: Using liburing 2023-05-09 20:48:25 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB 2023-05-09 20:48:25 0 [Note] InnoDB: Completed initialization of buffer pool 2023-05-09 20:48:25 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) 2023-05-09 20:48:26 0 [Note] InnoDB: 128 rollback segments are active. 2023-05-09 20:48:26 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... 2023-05-09 20:48:26 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. 2023-05-09 20:48:26 0 [Note] InnoDB: log sequence number 46456; transaction id 14 2023-05-09 20:48:26 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2023-05-09 20:48:26 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-05-09 20:48:26 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work. 2023-05-09 20:48:26 0 [Note] Server socket created on IP: '0.0.0.0'. 2023-05-09 20:48:26 0 [Note] Server socket created on IP: '::'. 2023-05-09 20:48:26 0 [Note] InnoDB: Buffer pool(s) load completed at 230509 20:48:26 2023-05-09 20:48:26 0 [Note] mariadbd: ready for connections. Version: '10.11.2-MariaDB-1:10.11.2+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution

tstill88 commented 1 year ago

This is strange. I used the docker container two months ago, and everything worked well. You are using same sample docker compose from repo?

Ive noticed in the folder i created "opensupports" the config and database folders are owned by root. Do i need to change something?

gamelaster commented 1 year ago

Good idea, it really might be a permission issue. Try to chmod the all files and check out if it will help.

tstill88 commented 1 year ago

Good idea, it really might be a permission issue. Try to chmod the all files and check out if it will help.

Am i doing something wrong here?

tom@a51-docker:~/docker/opensupports$ chown $(whoami) -R /home/tom/docker/opensupports/database chown: cannot read directory '/home/tom/docker/opensupports/database/opensupports': Permission denied chown: changing ownership of '/home/tom/docker/opensupports/database/aria_log.00000001': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/multi-master.info': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/ddl_recovery.log': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/ddl_recovery-backup.log': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/ib_logfile0': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/aria_log_control': Operation not permitted chown: cannot read directory '/home/tom/docker/opensupports/database/sys': Permission denied chown: changing ownership of '/home/tom/docker/opensupports/database/ibtmp1': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/mysql_upgrade_info': Operation not permitted chown: cannot read directory '/home/tom/docker/opensupports/database/mysql': Permission denied chown: cannot read directory '/home/tom/docker/opensupports/database/performance_schema': Permission denied chown: changing ownership of '/home/tom/docker/opensupports/database/ib_buffer_pool': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database/ibdata1': Operation not permitted chown: changing ownership of '/home/tom/docker/opensupports/database': Operation not permitted

tstill88 commented 1 year ago

OpenSupportissue

So spotted again some permissions issues in the browser but also and maybe i missed this before in the logs from opensupport.

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.3. Set the 'ServerName' directive globally to suppress this message

tstill88 commented 1 year ago

Good idea, it really might be a permission issue. Try to chmod the all files and check out if it will help.

Still not having any luck. chmod didnt seem to help unfortunately. I guess i can install OpenSupports without docker but would be nice. If you figure anything out let me know, im out of ideas for now.

chrisk88369 commented 8 months ago

Just spun up a instance and runing into the same problems, changing file permissions to test didn't do anything.

I know I'm late to the game here but any solution found on this?

gamelaster commented 8 months ago

@chrisk88369 I tried the image few months ago, I was not able to reproduce this issue :-(

chrisk88369 commented 8 months ago

@gamelaster I was blocked until I found this post late last night https://github.com/opensupports/opensupports/issues/1067

Was working after enabling SSL and slapping a cert on it