[Samba] Word and Excel files are read-only when opening

Robert LeBlanc robert at leblancnet.us
Mon Jul 6 14:30:23 GMT 2009


I have not been able to resolve this problem, but I need to have default
ACLs, so, I've croned a script to "fix" the permissions. I run this every 15
minutes and usually people don't notice it. When they call me, I ask them to
wait until after the script runs again. I would really like to see Office
fixed for this issue. Another weird thing is that it seems that for us,
after the second person edits the file and saves it, the problem really
doesn't show up again, at least in our testing.

Here is my scripts:
# fixfiles.sh
#! /bin/bash

/root/filecheck.sh | awk '{ print "\42"$0"\42" }' | xargs --no-run-if-empty
chmod -v u+w

----------------
# filecheck.sh
#! /bin/bash

/usr/bin/find /ls/groups/ -perm -u+r ! -perm /u+w -printf "%p\n"

It is pretty quick on our files system and only changes the files that are
wrong.


Robert LeBlanc
Life Sciences & Undergraduate Education Computer Support
Brigham Young University


On Mon, Jul 6, 2009 at 7:10 AM, Frank Bonnet <f.bonnet at esiee.fr> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello
>
> Well I have checked I there is no default ACL on the considered files
>
>
>
> dale at briannassaladdressing.com wrote:
> > Frank,
> >
> > Another thing worth checking is default acl's.  If default acl's exist,
> they can override the posix permissions.  Run getfacl on the directory/file
> in question to see if there are any listings with "default" in them.
> >
> > The setting of default acl's has caused word/excel/access read-only
> problems for me more than once.
> >
> > Dale
> >
> > -----Original message-----
> > From: Frank Bonnet f.bonnet at esiee.fr
> > Date: Fri, 03 Jul 2009 08:04:54 -0500
> > To: John Drescher drescherjm at gmail.com
> > Subject: Re: [Samba] Word and Excel files are read-only when opening
> >
> > John Drescher wrote:
> >>>>> Since we started our new Samba + LDAP backend server yesterday
> >>>>> some (not all) PC we have a problem with Word and Excel files
> >>>>> that are marked "read-only" when users are trying to open
> >>>>> them from their Samba network shares.
> >>>>>
> >>>>> This happen ONLY for *.doc and *.xls files , if we open
> >>>>> and save a *.html file with Word it works ...
> >>>>>
> >>>>> Any info/help greatly appreciated.
> >>>>>
> >>>>> Thank you
> >>>>>
> >>>> This probably is due to the fact that when Office saves a file it
> >>>> creates a new file it creates a temp file then deletes the old file
> >>>> then renames the temp file to the same name as the old file and in
> >>>> this case the os magically sets the permissions of the renamed temp
> >>>> file to what the old file had. The problem is that Linux does not have
> >>>> this weird filesystem behavior built in so you have to emulate this
> >>>> with samba. I believe some versons of samba required a create mask of
> >>>> 2777 to get this to work. BTW, this is discussed many times in the
> >>>> archives.
> >>>>
> >>>> John
> > Hello John
> >
> > I've tried but it did not work for me .
> >
> > Frank
> >
> - --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.11 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkpR9+EACgkQ6f7UMO5oSsUE/gCdEK3qJs2ELkwqD3EAiR/a2kfn
> H0AAnA+3YVAFjY4zQUIHaN1c1HDLsecd
> =wKVV
> -----END PGP SIGNATURE-----
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list