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

seafile.sh fails if the seafile-data does not belong to the user running the script in Docker #2840

Open
deragon opened this issue Oct 25, 2024 · 2 comments
Labels

Comments

@deragon
Copy link

deragon commented Oct 25, 2024

Error: the user running the script ("root") is not the owner of "/shared/seafile/seafile-data" folder, you should use the user "UNKNOWN" to run the script.

This is the error when starting the Docker following instructions found at Migrate from non-docker Seafile deployment to docker. I am using Method 1. On the host, user seafile (500) is owner of anything under /opt/seafile, including /opt/seafile-data/seafile/seafile-data.

No where in the documentation is this user mis-matched mentioned and a solution provided.

Ideally, the script should detect it is running under docker and should adapt accordingly.

@deragon
Copy link
Author

deragon commented Oct 25, 2024

Not tested, but one solution is to have a user and group named 'seafile' in the Docker image of Seafile, with say uid and gid 9876 which is unlikely to be used on a regular host. Then, one can ask to create this same user and group on the host and chown the host files to that user. The script should then run under the 'seafile' user within the Docker.

@deragon
Copy link
Author

deragon commented Nov 3, 2024

Come to think of it, the uid/gid could be passed as a parameter in the docker-compose.yml file.

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

No branches or pull requests

2 participants