Greetings guys, I recently switched my server to debian 12, and one of my priorities has been setting up samba, so I can both copy files and folders to/from the server, and view/edit files stored in it. I’ve a folder mapped to a drive I want to be shared (so basically an entire drive is being shared to the lan), and I can view its contents just fine, as well as copy & delete stuff from that drive while accessing it from another pc in the network, be it windows or linux. My issue however is that it doesn’t seem the permissions are set correctly. Every file and folder I copy to the server’s drive seems to have “forbidden” permissions for everything.
Here’s an example of a random image and its properties, stored in my main pc:
And here’s the exact same file, copied over to my server, viewing its properties while it’s in the server’s drive (lovely name, I know):
I’ve set samba so that it asks me for a username and a password every time I want to browse the server’s files (I want to be the only one in my house able to access them), which works, but as you can see, something’s wrong with file and folder permissions, and I don’t know how can I solve it. I watched a few tutorials but to no avail. I’ll also link my server’s smb.conf file in case that gives you any ideas on what shall I do. Thanks in advance:
[global]
server string = Kuroba-XR
workgroup = WORKGROUP
security = user
name resolve order = bcast host
[Ass storage]
path = /media/Ass-storage
readonly = no
valid users = dank_vader
force user = dank_vader
force group = dank_vader
public = yes
writable = yes
So I just tried setting masks, nothing different happened. Out of curiosity I tried accessing a file I coped from the server itself, and permissions there are just fine (here’s a screenshot of a file’s properties as seen from the server itself:)
I can read any copied files with no issues. So there must be something else related to the permissions themselves.
Over the years I have done serveral smb.conf by hand and dealing with permissions is a pain. I have discovered that the easiest way to do this is to run Cockpit with the 45Drives file sharing app installed. It’s so much easier to configure.
Not planning to. This is just for my home network. If I want to access it from outside my house I use tailscale. I just need to sort this permission thing out xD
check firewalls, open ports, use phone to browse smb share (on android there is “Mix” app with good ui) listen to incoming traffic on server and read archwiki for smb toroughly