Try the users suggestion from the other post and run "ls -an" to see the numeric user IDs rather than the names you're assigning. I've recently been building a new server with proxmox and learned this same lesson already as user "1000" gets assigned as user "100000" inside containers there to prevent it from having host permissions automatically from my understanding.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Do I need to enter the container bash and change something then? I tried adding UID and GID to the docker compose file, but it still fails. I updated the google docs notes if you want to see my steps.
Don't do this
Samba was not designed to be containerized. Install Samba native and try again. I'm almost certain the problem will go away.
Anyway, I would recommend you read this page https://wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
Samba was not designed to be containerized.
There are some things that shouldn't be containerized even tho they can be. I can see the benefit of a user wanting to containerize everything....it's one neat little package. I look at on a case by case basis. For instance, Caddy I installed on bare metal instead of a container even tho there is one for Caddy.
Does the docker user have permission to that folder?
How do I tell? In the docker-compose.yml file I put the user and password for my server user. I thought that was going to make it work?
OK let's run through some debug steps.
Test to see if samba is working by using a docker volume instead of trying to mount a file path.
If that works we can then assume its purely a file permission issue. U can check/test that by opening a shell inside the docker container and doing investigation from their.
If from the container shell u have perm issues then u will probably need to use the docker parameter to specify the user id of the container to match that of ur host or alternativly set the filesystem to match that of the container (this will lock u out of ur servers user access to the filesystem as u will no longer be owner).
If the container shell has perms to do shit in the mounted volume then it's a samba config issue. I've never done it myself but I've heard that samba is a bitch to configure.