You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to deploy seafile using docker an all appears to be a problem with user permissions.
First, I was getting this error:
Error: the user running the script ("root") is not the owner of "/shared/seafile/seafile-data" folder, you should use the user "ubuntu" to run the script.
Traceback (most recent call last):
File "/scripts/start.py", line 94, in <module>
main()
File "/scripts/start.py", line 79, in main
call('{} start'.format(get_script('seafile.sh')))
File "/scripts/utils.py", line 70, in call
return subprocess.check_call(*a, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-12.0.11/seafile.sh start' returned non-zero exit status 255.
So I set NON_ROOT=true but now I am getting:
*** Running /etc/my_init.d/01_create_data_links.sh...
*** Booting runit daemon...
*** Runit started as PID 21
*** Running /scripts/enterpoint.sh...
2025-04-07 07:13:27 Waiting Nginx
2025-04-07 07:13:27 Nginx ready
2025-04-07 07:13:27 Create linux user seafile in container, please wait.
2025-04-07 07:13:28 The permission of path seafile/ is incorrect.
2025-04-07 07:13:28 To use non root, run [ chmod -R a+rwx /opt/seafile-data/seafile/ ] and try again later, now quit.
*** /scripts/enterpoint.sh exited with status 1.
*** Shutting down runit daemon (PID 21)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
*** Killing all processes...
Is there a way to solve this that do not involve a+rwx?
This is my compose file:
services:
seafile-mysql:
image: ${SEAFILE_DB_IMAGE:-mariadb:10.11}
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- "${SEAFILE_MYSQL_VOLUME:-/opt/seafile-mysql/db}:/var/lib/mysql"
networks:
- starrnet
healthcheck:
test:
[
"CMD",
"/usr/local/bin/healthcheck.sh",
"--connect",
"--mariadbupgrade",
"--innodb_initialized",
]
interval: 20s
start_period: 30s
timeout: 5s
retries: 10
seafile-memcached:
image: ${SEAFILE_MEMCACHED_IMAGE:-memcached:1.6.29}
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- starrnet
seafile:
image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:12.0-latest}
container_name: seafile
# ports:
# - "80:80"
volumes:
- ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
environment:
- DB_HOST=${SEAFILE_MYSQL_DB_HOST:-seafile-mysql}
- DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
- DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
- DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
- DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
- SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
- SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
- SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}
- TIME_ZONE=${TIME_ZONE:-Etc/UTC}
- INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
- INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
- SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
- SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
- SITE_ROOT=${SITE_ROOT:-/}
- NON_ROOT=${NON_ROOT:-false}
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
- ENABLE_SEADOC=${ENABLE_SEADOC:-true}
- SEADOC_SERVER_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}/sdoc-server
depends_on:
seafile-mysql:
condition: service_healthy
seafile-memcached:
condition: service_started
networks:
- starrnet
networks:
starrnet:
external: true
I am unable to deploy seafile using docker an all appears to be a problem with user permissions.
First, I was getting this error:
So I set NON_ROOT=true but now I am getting:
Is there a way to solve this that do not involve a+rwx?
This is my compose file:
This is my .env:
The text was updated successfully, but these errors were encountered: