• 1 Post
  • 78 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle
  • foggy@lemmy.worldtoSelfhosted@lemmy.worldsamba docker compose help
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 days ago

    Okay, the permission error is almost certainly because the Samba process inside the container doesn’t have the right Linux permissions for the host directory /mnt/my_ext_hdd/my_dir/my_subdir.

    On your server running docker, find the numeric UID and GID for that directory: ls -ln /mnt/my_ext_hdd/my_dir/my_subdir

    you likely need to set PUID=<uid_from_step_1> and PGID=<gid_from_step_1> in the environment: section of your docker-compose.yml file for the Samba service.

    Recreate the container (docker compose up -d --force-recreate).

    WARNING: This assumes you are only accessing Samba from within your secure local network. Never expose Samba directly to the internet. Doing so is a major security risk and makes you a target for attacks.


  • You’re running into that permission error because of how Docker handles file permissions between the host and the container. It’s by design for security reasons. The user inside the container likely doesn’t have access to the mounted directory unless the UID and GID match what’s on the host. You can work around it, but it’s locked down intentionally.

    Also, what’s the use case here? What do you need file sharing via Samba in a Docker container for? If it’s just about moving files in and out, docker cp or docker exec -it container /bin/bash might be easier.



  • So, this question is very difficult to answer. I don’t want you to be discouraged though.

    I can’t answer you because I don’t know your goals. Since we’re in /c/selfhosted, I assume you’re experimenting with some self-hosted setups, which is awesome! But what exactly are you hoping to do with OpenWRT? And what’s the plan for the switch? Are you aiming for better network control, VLANs, firewall rules, or are you just looking to have network area storage?

    If you can share more about what you’re trying to accomplish, folks here will be much better equipped to help you figure out your next steps.


  • If you’ll be running Linux and trying to use steam to run games, at all, avoid the 14th gen is.

    If not, the 14th gen i9 is your bet.

    Something with Proton, the layer that makes steam work with Linux, has been causing tons of people a lot of grief myself included. Any games that rely heavily on vulkan shaders will cause my whole system to crash under heavy load. It’s a known thing and Intel still seems clueless as to what to do to resolve it, afaik.








  • Okay. Your laptop can’t ping or SSH into the server. First, figure out if the problem is one-way. Can the server ping the laptop, or is it just dead in both directions?

    You mentioned all other devices communicate normally—do they all fail to reach the laptop, or is the issue isolated to the laptop and server pair?

    Physically check the server and confirm both IP addresses to ensure you’re not chasing the wrong info. Once you’ve got the correct IPs, ping the laptop from the server’s side. If the server can’t reach it either, you know this isn’t just a laptop-to-server problem.

    Also, did you set up a firewall on the laptop? That’s worth looking into. And yes, it’s annoying, but try the simple stuff: disconnect and reconnect your laptop’s Wi-Fi, reboot it, even run sudo apt update just to rule out anything weird. Start with these basics before moving on to more complicated troubleshooting.







  • Everyone is gonna learn best differently. There’s no best place to start.

    Id start with solving a problem. For me, this was not wanting to make a backup to transfer my data from my old machine to my new one. So I built a little Ubuntu Server, setup a rudimentary samba share, setup users/groups, and figured out how to access that data from my network.

    Docker is easy, you’ll learn it by mistake. It’ll haunt you like it’s some complicated thing until you realize you’re doing it and it’s literally incredibly straightforward.

    From there, Id maybe say go to WordPress and follow instructions about setting up a WordPress site in a docker container. Oops, you just learned docker.

    Id hold off on hosting email. I mean it’s a noble goal but it’s a fucking headache. But that’s just me! Like I said, everyone’s different.

    Piece of advice, before you go hosting a monero server, dig into cybersecurity. Particularly server hardening. I recommend Hack The Box. There’s tons of platforms, though.