unix extensions not working?

Bug #1883234 reported by Malte Kleemeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I was trying to share home directories between two linux machines, so I set-up a samba server (using the default the smb.conf, just uncommenting things in the [homes] section, see attached smb.conf).

That worked nicely, except for one thing:

When mounting the shared home directory all files are marked as executable.

If is obviously due to the fact that unix permissions are not correctly send from server to client.

smbclient reports the following error:
   smbclient //server/user
   Enter WORKGROUP\users's password:
   Try "help" to get a list of possible commands.
   smb: \> stat testparm_v.log
   Server doesn't support UNIX CIFS calls.

According to the samba docu support for unix permissions is controlled by "unix extensions" in the [global] section of smb.conf. If no value is supplied is is turned on by default. As can been been from the output of "testparm -v" ("unix extensions = Yes") that unix extensions are indeed enabled for my set-up.

So the expected behaviour is that file permissions are correctly exported from the server when mounting the homes share.

Maybe I misunderstood something (samba configuration is quite complex), but I think I found an error in the samba package. Any advice is welcome. Many thanks in advance!

Additional Information

1) Description: Ubuntu 20.04 LTS
   Release: 20.04

2) samba:
   Installed: 2:4.11.6+dfsg-0ubuntu1.2

Revision history for this message
Malte Kleemeier (malte-kleemeier) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Unix extensions only work for the SMB1 protocol, which has been deprecated and is no longer used by default. Development is ongoing to support them in SMB3.

You can re-enable SMB1 by adding this to [global] in the server's smb.conf:

server min protocol = NT1

Can you please try again with the above setting and report back?

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Malte Kleemeier (malte-kleemeier) wrote : Re: [Bug 1883234] Re: unix extensions not working?

Hello Andreas,Many thanks for the fast reply!I also had to set "client min protocol = NT1" and to start smbclient with "-m NT1", but it actually works exactly  the way you said. I would never have found the solution without your kind  help. Again, many thanks!!Maybe the fact that unix extensions are coupled to the protocol level should be mentioned in the samba documentation (man page of smb.conf). I did a fair amount of research on the net and could not find any hint about that.One last question: Is it possible to share files with correct file permissions under the current SMB3 protocol? I know the SMB protocol comes from the windows realm, but I think it is not completely unreasonable to use it to share files between linux boxes.Regards,Malte Kleemeier
-------- Ursprüngliche Nachricht --------Von: Andreas Hasenack <email address hidden> Datum: 12.06.20 14:15 (GMT+01:00) An: <email address hidden> Betreff: [Bug 1883234] Re: unix extensions not working? Unix extensions only work for the SMB1 protocol, which has beendeprecated and is no longer used by default. Development is ongoing tosupport them in SMB3.You can re-enable SMB1 by adding this to [global] in the server'ssmb.conf:server min protocol = NT1Can you please try again with the above setting and report back?** Changed in: samba (Ubuntu)       Status: New => Incomplete-- You received this bug notification because you are subscribed to the bugreport.https://bugs.launchpad.net/bugs/1883234Title:  unix extensions not working?Status in samba package in Ubuntu:  IncompleteBug description:  I was trying to share home directories between two linux machines, so  I set-up a samba server (using the default the smb.conf, just  uncommenting things in the [homes] section, see attached smb.conf).  That worked nicely, except for one thing:  When mounting the shared home directory all files are marked as  executable.  If is obviously due to the fact that unix permissions are not  correctly send from server to client.  smbclient reports the following error:     smbclient //server/user     Enter WORKGROUP\users's password:      Try "help" to get a list of possible commands.     smb: \> stat testparm_v.log      Server doesn't support UNIX CIFS calls.     According to the samba docu support for unix permissions is controlled  by "unix extensions" in the [global] section of smb.conf. If no value  is supplied is is turned on by default. As can been been from the  output of "testparm -v" ("unix extensions = Yes") that unix extensions  are indeed enabled for my set-up.  So the expected behaviour is that file permissions are correctly  exported from the server when mounting the homes share.  Maybe I misunderstood something (samba configuration is quite  complex), but I think I found an error in the samba package. Any  advice is welcome. Many thanks in advance!  Additional Information  1) Description: Ubuntu 20.04 LTS     Release: 20.04  2) samba:     Installed: 2:4.11.6+dfsg-0ubuntu1.2To manage notifications about this bug go to:https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1883234/+subscriptions

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It's messy, and I don't think there is a general case that works for everyone. The good news is that unix extensions for SMB3 are coming, and there are test implementations out there already.

There was a talk about it in the recent samba XP 2020 conference, take a look at https://sambaxp.org/archive/

day 3, track 2: "Optimizing Linux Access to Samba: POSIX Protocol Extensions for SMB3.1.1"

The slides and video of the talk should be up soon.

I'll close this bug in the meantime then.

Changed in samba (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Malte Kleemeier (malte-kleemeier) wrote :

I see, it's work in progress. Many thanks!

On 12.06.20 15:22, Andreas Hasenack wrote:
> It's messy, and I don't think there is a general case that works for
> everyone. The good news is that unix extensions for SMB3 are coming, and
> there are test implementations out there already.
>
> There was a talk about it in the recent samba XP 2020 conference, take a
> look at https://sambaxp.org/archive/
>
> day 3, track 2: "Optimizing Linux Access to Samba: POSIX Protocol
> Extensions for SMB3.1.1"
>
> The slides and video of the talk should be up soon.
>
> I'll close this bug in the meantime then.
>
>
> ** Changed in: samba (Ubuntu)
> Status: Incomplete => Invalid
>

--
Malte Kleemeier
Freudenbergstr. 13
28213 Bremen
Telefon: +49 421 3971382
Mobil: +49 1575 3054600
         (+49 1575 8868309)
         (+49 179 1332707)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.