0

I'm running Kubuntu 21.04. I have an external USB3 8TB drive formatted as ext4. It is being shared on the network as SAMBA share. The name of the drive is nest, and my smb.conf is configured as below:

[nest]
comment = nest
path = /media/JMS10/nest
read only = no
browsable = yes
guest ok = no
public = yes
force user = JMS10

I am connecting to the share from an Windows 10 laptop. When Windows asks for a username/password, I'm using JMS10 as the username, and I specify the password. I'm able to browse and view all of the contents. The problem is when I delete a file, it tells me it is deleted, but when I refresh the folder the files are still there. Also when I open the folder physically from my Kubuntu PC I can also see the files.

So I'm not sure why the files aren't getting deleted. It used to work fine before, and at some point it stopped working properly. I haven't changed the smb.conf in a long time.

8
  • hi JMS. if you do "ls -la on /media/JMS10/nest", what permissions are you seing?
    – jpbrain
    Aug 26, 2021 at 19:40
  • try this... change force user to root and use explicit write list = {users} separated by space. Remember restarting you samba server.
    – jpbrain
    Aug 26, 2021 at 19:45
  • The user and group is JMS10. And the permissions are drwxrwxr-x for directories, and -rw-rw-r-- for files. Aug 26, 2021 at 19:50
  • I tried force user = root, and write list = JMS10 but it is still doing the same thing. Aug 26, 2021 at 19:54
  • perms look ok. is it one file or every file?
    – jpbrain
    Aug 26, 2021 at 19:56

1 Answer 1

0

I was able to find the issue. There were a few things wrong with my setup. Also, it was not logging any error messages in the /var/log/samba folder. My guess is that since I was connecting from a Windows client, there is probably an edge case (bug) that I hit.

First, I removed the public and guest ok properties. I found out that they are synonymous, and if you look at my original config above, I was setting yes for one and no for the other.

Second I added my user to SAMBA by runnning smbpasswd -a JMS10, and added the valid users line below. After that it started working.

[nest]
path = /media/JMS10/nest
read only = no
browsable = yes
valid users = JMS10

So my setup was incorrect, and not sure why it was working before without any issues. My assumption was that SAMBA doesn't need a separate username, but that was incorrect. For any newbies out there, SAMBA doesn't integrate with your Linux account. So you have you create a new user for SAMBA, and the password is also different from your Linux account.

2
  • the password is also different from your Linux account. I do not think this is correct and in my case on 6 different machines it is not.
    – David
    Sep 2, 2021 at 6:34
  • That's very odd. Maybe because I passed the -a parameter it sets a different password. Sep 5, 2021 at 6:42

You must log in to answer this question.

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