[Samba] Problem with ACL and Samba

Greg Byshenk samba at byshenk.net
Wed Dec 19 10:50:27 GMT 2007


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