0

I'm trying to make my samba share (running on Debian 10) writable but it seems that anything I try just breaks the share and I cannot access it anymore.

Here's my current configuration:

[MediaServer4TB]
   comment = Media Server 4TB
   browseable = yes
   path = /media/sf_filesrvr
   guest ok = no
   read only = no
   create mask = 0600
   directory mask = 0700
   security = user
   encrypt passwords = yes
   force user = root
   writeable = yes

The client is an Ubuntu 20.04 LTS machine.

Could the issue be that the machine is a virtual machine using a virtual folder as directory for the share? If yes, how would you proceed?

EDIT: I realized I can copy files and folders from the remote machine but I cannot move files inside the samba share. The directory /media/sf_filesrvr is writable by root (the user that is trying to access it)

Here is the log output for the specific client:

[2022/05/01 15:33:49.864251,  3] ../../auth/ntlmssp/ntlmssp_sign.c:623(ntlmssp_sign_reset)
  NTLMSSP Sign/Seal - Initialising with flags:
[2022/05/01 15:33:49.864280,  3] ../../auth/ntlmssp/ntlmssp_util.c:72(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0x62088215
[2022/05/01 15:33:49.864331,  3] ../../auth/ntlmssp/ntlmssp_sign.c:623(ntlmssp_sign_reset)
  NTLMSSP Sign/Seal - Initialising with flags:
[2022/05/01 15:33:49.864352,  3] ../../auth/ntlmssp/ntlmssp_util.c:72(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0x62088215
[2022/05/01 15:33:49.864612,  3] ../../source3/auth/token_util.c:688(finalize_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2022/05/01 15:33:49.865078,  3] ../../source3/groupdb/mapping.c:854(pdb_create_builtin_alias)
  pdb_create_builtin_alias: Could not get a gid out of winbind
[2022/05/01 15:33:49.865115,  2] ../../source3/auth/token_util.c:719(finalize_local_nt_token)
  WARNING: Failed to create BUILTIN\Administrators group!  Can Winbind allocate gids?
[2022/05/01 15:33:49.865611,  3] ../../source3/groupdb/mapping.c:854(pdb_create_builtin_alias)
  pdb_create_builtin_alias: Could not get a gid out of winbind
[2022/05/01 15:33:49.865647,  2] ../../source3/auth/token_util.c:739(finalize_local_nt_token)
  WARNING: Failed to create BUILTIN\Users group! Can Winbind allocate gids?
[2022/05/01 15:33:49.866176,  3] ../../source3/groupdb/mapping.c:854(pdb_create_builtin_alias)
  pdb_create_builtin_alias: Could not get a gid out of winbind
[2022/05/01 15:33:50.008196,  3] ../../source3/smbd/password.c:84(register_homes_share)
  Adding homes service for user 'root' using home directory: '/root'
3
  • 1
    Is the directory /media/sf_filesrvr writable by the user who is trying to write to it? What do the logs say? Add this information to the question. Do not post it in the comments. Commented May 1, 2022 at 13:36
  • Addded the information in the question.
    – giovi321
    Commented May 1, 2022 at 14:54
  • security = user is a global setting and cannot be in the share definition. (See man smb.conf and notice that the definition has (G) after it rather than (S), showing it much be in the global section Commented Dec 22, 2022 at 12:02

1 Answer 1

0

This awnser solves the problem in case you can mount your share properly with an user/passwd pair and you are able to read the content of the share from a remote client, but you can't write into the share.

Of course you need a section in your /etc/samba/smb.conf like this:

[BobsVolume]
comment = BobsVolume
path = /mnt/BobsVolume
create mask = 0600
directory mask = 0700
read only=No
guest ok=No
valid users = bob

The most important parameter is read only=no and valid user. writeable=yes is a synonym.

Well, it seems to me that nobody's answer across internet contains the key to solve the problem and that is: your share must be owned by your system's smbuser:smbgroup.

If you are using the docker image dperson/samba, dont forget to run

chown smbuser:smb /mnt/BobsVolume

in this example.

1
  • The OP had force user = root so local filesystem permissions shouldn't have been an issue Commented Dec 22, 2022 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .