I don't know why I can't register bugzilla so I post here. I have two ubuntu 16.04 machine A, B, and A install samba version 4.10.6, and B install version 4.3.11. I use samba-vfs in machine A. I mount share of A in B ex: sudo mount -t cifs -o username='ppp',password='admin' //IP/public /home/ppp/test And I found I can create file like $ touch test/yo But I can read/write from existing files in /home/ppp/test Here is smb.conf of A and I use samba-vfs module: [global] workgroup = MYGROUP server string = Samba Server server role = standalone server log file = /usr/local/samba/var/log.%m max log size = 50 dns proxy = no [printers] comment = All Printers path = /usr/spool/samba browseable = no guest ok = no writable = no printable = yes [public] path = /home/ppp/share available = yes valid users = ppp read only = no browseable = yes public = yes vfs objects = full_audit full_audit:prefix = [%U:%g@%I] full_audit:success = all full_audit:failure = all full_audit:facility = local7 full_audit:priority = info I found I can create file if I remove vfs variable and full_audit blabla. Then I dig in and I found the %g will cause me fail to create file. When I change from full_audit:prefix = [%U:%g@%I] to full_audit:prefix = [%U:%I] I can create file finally. Anyone can help?
On 08/08/2019 05:32, lampahome via samba wrote:> I don't know why I can't register bugzilla so I post here. > > I have two ubuntu 16.04 machine A, B, and A install samba version 4.10.6, > and B install version 4.3.11. > I use samba-vfs in machine A. > > I mount share of A in B ex: > sudo mount -t cifs -o username='ppp',password='admin' //IP/public > /home/ppp/test > > And I found I can create file like $ touch test/yo > But I can read/write from existing files in /home/ppp/test > > Here is smb.conf of A and I use samba-vfs module: > [global] > > workgroup = MYGROUP > > server string = Samba Server > > server role = standalone server > > log file = /usr/local/samba/var/log.%m > > max log size = 50 > > dns proxy = no > > [printers] > comment = All Printers > path = /usr/spool/samba > browseable = no > guest ok = no > writable = no > printable = yes > > [public] > path = /home/ppp/share > available = yes > valid users = ppp > read only = no > browseable = yes > public = yes > vfs objects = full_audit > full_audit:prefix = [%U:%g@%I] > full_audit:success = all > full_audit:failure = all > full_audit:facility = local7 > full_audit:priority = info > > I found I can create file if I remove vfs variable and full_audit blabla. > > Then I dig in and I found the %g will cause me fail to create file. > > When I change from > full_audit:prefix = [%U:%g@%I] > to > full_audit:prefix = [%U:%I] > > I can create file finally. > > Anyone can help?First, this is useless: 'public = yes' (which is really 'guest ok = yes') for two reasons, you also have 'valid users = ppp', so only 'ppp' can connect, but even if that wasn't there, it wouldn't allow guest access because you do not have 'map to guest = bad user' in [global]. As for '%g', have you created a Samba group for ppp's primary group and mapped ppp's primary group to this ? Rowland
> > > First, this is useless: 'public = yes' (which is really 'guest ok > yes') for two reasons, you also have 'valid users = ppp', so only 'ppp' > can connect, but even if that wasn't there, it wouldn't allow guest > access because you do not have 'map to guest = bad user' in [global]. > > As for '%g', have you created a Samba group for ppp's primary group and > mapped ppp's primary group to this ? >I do smbpasswd -a ppp. Should I do something else?
L.P.H. van Belle
2019-Aug-08 12:11 UTC
[Samba] [Bug] Cannot create file but read/write is ok
Hai, I would start with saying, upgrade B the 4.3.11 samba to 4.10.6 Then try again, if you then still have problems report it on the list again. To much has changed between these version. But you can try these also: sudo mount -t cifs -o vers=1,username='ppp',password='admin' //IP/public /home/ppp/test Or sudo mount -t cifs -o vers=2.1,username='ppp',password='admin' //IP/public /home/ppp/test Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > lampahome via samba > Verzonden: donderdag 8 augustus 2019 6:33 > Aan: samba at lists.samba.org > Onderwerp: [Samba] [Bug] Cannot create file but read/write is ok > > I don't know why I can't register bugzilla so I post here. > > I have two ubuntu 16.04 machine A, B, and A install samba > version 4.10.6, > and B install version 4.3.11. > I use samba-vfs in machine A. > > I mount share of A in B ex: > sudo mount -t cifs -o username='ppp',password='admin' //IP/public > /home/ppp/test > > And I found I can create file like $ touch test/yo > But I can read/write from existing files in /home/ppp/test > > Here is smb.conf of A and I use samba-vfs module: > [global] > > workgroup = MYGROUP > > server string = Samba Server > > server role = standalone server > > log file = /usr/local/samba/var/log.%m > > max log size = 50 > > dns proxy = no > > [printers] > comment = All Printers > path = /usr/spool/samba > browseable = no > guest ok = no > writable = no > printable = yes > > [public] > path = /home/ppp/share > available = yes > valid users = ppp > read only = no > browseable = yes > public = yes > vfs objects = full_audit > full_audit:prefix = [%U:%g@%I] > full_audit:success = all > full_audit:failure = all > full_audit:facility = local7 > full_audit:priority = info > > I found I can create file if I remove vfs variable and > full_audit blabla. > > Then I dig in and I found the %g will cause me fail to create file. > > When I change from > full_audit:prefix = [%U:%g@%I] > to > full_audit:prefix = [%U:%I] > > I can create file finally. > > Anyone can help? > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >