Additionally, have you tried the
writeable = yes
Option?
Additionally, have you tried the
writeable = yes
Option?
I've read that writeable = yes
and read only = no
are interchangeable and you don't need one if you have the other, but I'll try this when I get home and report back.
Two things:
It may be easier to explain exactly what you're trying to achieve here so someone can offer a better way of setting this up for you.
This is a 2nd server I'm building to back up data from my main NAS. The goal is to set up something like restic to back up my important pictures/documents/etc. Since the CPU on this also has Quicksync I'm planning to use it for Jellyfin and migrate my Radarr/Sonarr stack over.
All I'm saying is that if you're sharing files between two containers, giving them both volumes and using the network to share those files is not the best practiced way of doing that. One volume, two containers, both mount the same volume and skip the network is the way to do that.
To solve for this, you create user mapping in the samba configs that say "Hey, johndoe in samba is actually the ubuntu user on the OS", and that's how it solves for permissions. Here's an example issue that is similar to yours to give you more context. You can start reading from there to solve for your specific use-case.
If you choose NOT to fix the user mapping, you're going to have to keep going back to this volume and chown'ing all the files and folders to make sure whichever user you're connecting with via samba can actually read/write files.
Here's a discussion about whether to install on the host vs making a separate VM to serve the files. I don't know if there's a right or wrong way to do this, but since I'm running mergerfs/snapraid I figure I'd put it in a VM to keep it separate from Proxmox.
I ended up getting it to work by checking the permissions on the Samba server. The folders were owned by the right user (uid=1000) but not the right gid (gid=something else). chown'd everything to 1000:1000 and 775 permissions and now everything is functioning as expected. Thanks for the help!
First of all, docker is not a VM. And for your issue, don't mount file shares like that in docker. Mount the file share on the host and then add it to the container as a volume. Again, a container is not a VM. It seems like you are trying to use a container like a VM. The only reason to mount a file share inside a container it's if the app inside the container supports and can handle file shares by its own like nextcloud.
I guess I should have been more clear. My "Docker VM" is an Ubuntu VM (running on the same Proxmox host as my "File server" VM) that I will be using to deploy docker containers. I am trying to mount the SMB share on the Ubuntu VM and will pass that to the containers as a volume.
Oh ok, that makes more sense. Then just like the other person says, it's most likely a user permission error. Is your dockeruser in the docker VM the same as in the other VM? As in the same uid and guid? This week I created a NFS share to mount for a container and I created a new user in both side with the same uid and guid. I suggest you to use a high uid and guid to avoid conflicts.
Edit: I think I know what is happening. The users in the allowed users at the smb conf file are not the same as the Linux users. You have to create those users with the smbpasswd command. You probably have anonymous login enabled, so when you mount the share you are actually mounting it as an anonymous user and that's why it's read only.
Maybe take a look at your smb share config?
Sounds like something that are considered "Special" permissions on Windows that allow you to do only some actions but not all (way beyond read/write/execute)
Maybe also take a look if there are ACLs active?
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:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!