[Samba] Problem with ACL and Samba

Greg Byshenk samba at byshenk.net
Wed Dec 19 13:46:01 GMT 2007


On Wed, Dec 19, 2007 at 08:57:41AM -0200, Felipe Tocchetto wrote:
 
> I put the defaults acls in my previous email, take a look:
> 
> [root at server /home/smb/adm]# getfacl -d teste
> #file:teste
> #owner:1002
> #group:1006
> user::rwx
> group::rwx
> group:suporte:rwx
> group:administ:rwx
> mask::rwx
> other::---
 
> The default acls have the entries:
 
> group:suporte:rwx
> group:administ:rwx

Sorry, my mistake (they were there, but I misread).

 
> But after I edit the file, one of these disapear.
 
> I read something about a samba bug:
> https://bugzilla.samba.org/show_bug.cgi?id=2346
> 
> But it has been fixed a long time ago.
 
> Any tips?

Not certain. Are there any masks set in your smb.conf?  If you create
a new file within Excel, what are the permissions on it?

I've just tested this myself, and cannot recreate the problem.  I can
copy in an Excel file, edit it (WinXP SP2), and save it, and I get the
correct ACLs on the server. Server is very slightly different than 
yours, but not much:

   FreeBSD 6.3-PRERELEASE (Nov 12 2007)
   samba-3.0.26a_1,1

Also, you could try turning up the log level and then looking for 
errors.

-greg

 
> On Dec 19, 2007 8:50 AM, Greg Byshenk <samba at byshenk.net> wrote:
> 
> > On Tue, Dec 18, 2007 at 10:15:42PM -0200, Felipe Tocchetto wrote:
> >
> > > I am facing a strange problem that I could not solve, so, maybe you can
> > help
> > > me.
> > >
> > > Look at this situation:
> > >
> > > I created a new directory with those ACLs (through Samba using Windows
> > XP)
> > >
> > > [root at server /home/smb/adm]# getfacl teste
> > > #file:teste
> > > #owner:1002
> > > #group:1006
> > > user::rwx
> > > group::rwx
> > > group:suporte:rwx
> > > group:administ:rwx
> > > mask::rwx
> > > other::---
> > >
> > > [root at server /home/smb/adm]# getfacl -d teste
> > > #file:teste
> > > #owner:1002
> > > #group:1006
> > > user::rwx
> > > group::rwx
> > > group:suporte:rwx
> > > group:administ:rwx
> > > mask::rwx
> > > other::---
> > >
> > > My ACLs are right, ok, now I will copy a XLS file to that folder:
> > >
> > > [root at server /home/smb/adm]# getfacl teste/excel-test.xls
> > > #file:teste/excel-test.xls
> > > #owner:1002
> > > #group:1006
> > > user::rwx
> > > group::rw-
> > > group:suporte:rwx
> > > group:administ:rwx
> > > mask::rwx
> > > other::---
> > >
> > > OK, the samba server inhert the permissions and the ACLs, everything is
> > fine
> > > until now.
> > >
> > > But when I edit this file with MS Excel, and save it, look what happen
> > to
> > > the ACLs:
> > >
> > > [root at server /home/smb/adm]# getfacl teste/excel-test.xls
> > > #file:teste/excel-test.xls
> > > #owner:1002
> > > #group:1006
> > > user::rwx
> > > group::---
> > > group:suporte:rwx
> > > mask::rwx
> > > other::---
> > >
> > > The ACL entry "group:administ:rwx" just have gone after I save the file.
> > >
> > > It happens with Windows XP, Vista, Office 2003 and 2007. My samba
> > version is
> > > Samba version 3.0.26a, my SO is FreeBSD 6.2. I installed samba through
> > > Ports.
> > >
> > > Anybody knows what is wrong?
> >
> >
> > I'm not sure if it is the cause, but what are your default ACLs for the
> > directory in question?
> >
> > When you copy in a file from Windows, I think that it will preserve its
> > permissions, but if you edit and save, you are actually creating a new
> > file, which will be created based on the defaults for that location/user.
> >
> > Check the output of 'gefacl -d teste'.

-- 
greg byshenk  -  gbyshenk at byshenk.net  -  Leiden, NL


More information about the samba mailing list