Replies: 5 comments 2 replies
-
Running Docker containers as root can pose several security risks. This is why it is not supported - and you should re-think running any Docker as 'root'. Some reasons why it is a bad idea, and why this is not supported:
The user inside the Docker container is not the local user you are trying to write the data with, and the permissions on the server providing the SMB share is potentially where the permission fault is.
Again - inside the container, the volume you are trying to mount as the configuration path where the DB is being stored can't be correctly accessed or is in use by another process. That particular error message also indicates that whatever path you are using, you may have another local process already reading|writing to that path and database - thus it is locked and cant be opened.
Rethink your security model - do not run things as 'root' Potentially you need to step backwards here and look at how that SMB mount is being served, the permissions there, then the permissions on the mount point and how you are mounting it, what effective permissions are being given by the 'mount' command All of this is outside the support for this client, potentially ask your question on how to correctly expose a SMB share to Linux on relevant forums for the system providing the SMB share and/or the Linux distribution you are using on how to correctly mount that share. |
Beta Was this translation helpful? Give feedback.
-
@jamess60 Please test RC3 within your environment. |
Beta Was this translation helpful? Give feedback.
-
@jamess60 Normal usage, running Docker as an unprivileged user
Normal usage, running Docker as an unprivileged user, but using ONEDRIVE_RUNAS_ROOT flag
|
Beta Was this translation helpful? Give feedback.
-
@jamess60 root user, running docker as root, attempting to run the container:
This is the expected result here root user, running docker as root, attempting to run the container but using ONEDRIVE_RUNAS_ROOT flag
|
Beta Was this translation helpful? Give feedback.
-
Hi @abraunegg - Thanks for the quick action! :) |
Beta Was this translation helpful? Give feedback.
-
Hi
I tried running the container as root but quickly discovered this isn't supported.
I tried setting the UID/GID to a none root user, but this user cant write to my SMB share (unsure why given the mount path is chowned to this user, 777d and permissions are appropriate on the file server but I digress...)
I then tried using docker volumes (as root can write to the smb share), but the container throws a "A database execution error occurred: database is locked" error.
I only desire to sync a single onedrive account - really not sure why this cant work as root?
Any tips/workarounds?
Beta Was this translation helpful? Give feedback.
All reactions