I have a USB drive mounted to /media/usbdrive on my Ubuntu 20.04 box. I can write files to any share except the root share. Meaning, I have these shares set up in smb.conf:
[usb]
path = /media/usbdrive
valid users = @samba
force user = shareuser
writable = yes
read only = no
browseable = yes
[apps]
path = /media/usbdrive/Apps
valid users = @samba
force user = shareuser
writable = yes
read only = no
browseable = yes
[music]
path = /media/usbdrive/Music/MP3
valid users = @samba
force user = shareuser
writable = yes
read only = no
browseable = yes
From Windows 10 (192.168.0.229), I can access the shares by providing a password for shareuser
. Then I can write files to any directory in the apps
and music
shares, but not usb
- I get an "access is denied" error. The same directories that are inaccessible through usb
can be written to when accessed through the apps
and music
shares.
Any ideas? I've tried playing around with different owners for the /media/usbdrive directory but it doesn't seem to help (but maybe I'm missing something).
drwxrwxrwx+ 11 root samba 4096 Apr 9 12:07 usbdrive
$ sudo smbstatus
Samba version 4.11.6-Ubuntu
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
3682 shareuser shareuser 192.168.0.229 (ipv4:192.168.0.229:52277) SMB3_11 - partial(AES-128-CMAC)
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
usb 3682 192.168.0.229 Sun May 10 02:19:18 PM 2020 PDT - -
apps 3682 192.168.0.229 Sun May 10 02:21:40 PM 2020 PDT - -
music 3682 192.168.0.229 Sun May 10 02:19:18 PM 2020 PDT - -
Locked files:
Pid User(ID) DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
3682 1001 DENY_NONE 0x80 RDONLY NONE /media/usbdrive . Sun May 10 14:19:18 2020
3682 1001 DENY_NONE 0x80 RDONLY NONE /media/usbdrive/Music/MP3 . Sun May 10 14:19:18 2020
3682 1001 DENY_NONE 0x100081 RDONLY NONE /media/usbdrive/Apps . Sun May 10 14:22:00 2020
3682 1001 DENY_NONE 0x100081 RDONLY NONE /media/usbdrive/Apps . Sun May 10 14:22:15 2020
3682 1001 DENY_NONE 0x100081 RDONLY NONE /media/usbdrive/Apps . Sun May 10 14:22:25 2020