27
submitted 1 year ago* (last edited 1 year ago) by agressivelyPassive@feddit.de to c/linux@lemmy.ml

I have a public SMB share mainly as a media dump. Everyone can read and write, without any auth - as intended. However, if I copy files via SSH (as a regular user, not the samba user), these files are of course owned by that user and thus not writable for the samba user - so I can't touch these files via SMB.

My config looks like this

[public]
  path = /path/to/samba/public
  guest ok = yes
  writeable = yes
  browseable = yes
  create mask = 0664
  directory mask = 0775
  force user = sambapub
  force group = users

I can fix the permissions by simply chown/chmod all files, but that's not really a solution.

you are viewing a single comment's thread
view the rest of the comments
[-] agressivelyPassive@feddit.de 3 points 1 year ago
  force user = sambapub
  force group = users

This should set the user, and it's exactly what I'm seeing if I copy files over via smb. I'm aware, that it's kind if expected, but not what is intended (by me).

[-] Nibodhika@lemmy.world 1 points 1 year ago

Are you using the sambapub user to SSH the files into the folder? I thought that the force user refered to a samba user, not a Linux user.

this post was submitted on 28 Sep 2023
27 points (96.6% liked)

Linux

48376 readers
1029 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS