OO3 opens each ODT as read-only (on network share)

Issues with installing under all versions of MS Windows

OO3 opens each ODT as read-only (on network share)

Postby cyberwizzard » Mon Dec 22, 2008 3:29 pm

We have just upgraded to OO3 on the office and now I'm running into a real problem. For some reason, Samba does not tell Windows XP if a folder on a share has child content which has the read-only flag set. The result is that each and every folder on a shared drive has read-only partially set (it's not a tick, its a square indication that 'some' folders or files have it set - which is not true actually).

This behaviour seems to be the result when you are not using full blown ACLs on you files. Because the server has been up and running for 10 years in the same fashion I don't see the problem with it.

OpenOffice 2.x had no problems working with this, as long as the file itself was not read-only (which none of the files are). while the containing folder was marked partially 'read-only'. OpenOffice 3.x opens each and every odt file as read-only. This seems to be because the parent folder is partially marked as read only because if I try to open the same files on a local copy or a network share from a Windows workstation the file and folder attributes are fine and OpenOffice 3 opens the file read-write just fine.

How do I disable to behavior in OpenOffice 3?

Note: this is not a permission problem in unix, this is not a permission problem in samba, you might argue that this incomplete ACL support emulation in samba is undesired but the folder is not completely read-only, it is partially marked. Also OpenOffice is the only program that ever made a bug deal out of this, even though I am told that Photoshop might do the same (but we don't use photoshop and it seems that it can be turned off in there as well).

Update: after enabling ACL and dos attributes, all files now have their archive flag cleared and the flags are stored properly. However, the folders are still partially marked read-only.

Update: after looking at the Windows sharing it seems that Windows is not passing read-only for network shared folders - mmm. :?
Last edited by cyberwizzard on Mon Dec 22, 2008 4:16 pm, edited 1 time in total.
OOo 3.0.X on Ms Windows XP
cyberwizzard
 
Posts: 4
Joined: Mon Dec 22, 2008 3:18 pm

Re: OO3 suddenly looks at the read-only attribute on parent fold

Postby cyberwizzard » Mon Dec 22, 2008 4:15 pm

I finally found the problem: OpenOffice 3 does not lock the file but instead it creates a lock file. This lock file is called '.lock....' - and the starting dot in the file name is what screwed me over: Samba hides the dot files and folders by default because they are considered hidden.

To enable dot files comment out the veto line (by default set) in smb.conf:
Code: Select all   Expand viewCollapse view
#veto files = /.*/


Now I'm looking for a way to disable this new behavior and simply use old skool file locking like OO2 used to do...
OOo 3.0.X on Ms Windows XP
cyberwizzard
 
Posts: 4
Joined: Mon Dec 22, 2008 3:18 pm

Re: OO3 opens each ODT as read-only (on network share)

Postby acknak » Mon Dec 22, 2008 5:53 pm

Now I'm looking for a way to disable this new behavior and simply use old skool file locking like OO2 used to do...

Not going to happen--at least as I understand the thinking behind it--unless you dive into the code and create your own custom version. Using lock files is the only method that works on every platform and every network (with compatible settings).

What are Windows' hidden files hidden from? Everything, even opening the hidden file? It seems that they don't work like unix' dot-files.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: OO3 opens each ODT as read-only (on network share)

Postby cyberwizzard » Mon Dec 22, 2008 6:15 pm

acknak wrote:
What are Windows' hidden files hidden from? Everything, even opening the hidden file? It seems that they don't work like unix' dot-files.

Hidden normally means in Windows that the hidden file attribute is set and normally, windows explorer hides those files (unless overridden by the user).

But the problem here is that unix does consider dot files to be hidden by default and that is why Samba on CentOS (and possibly other distributions) have a guarding rule against making dot files or reading them. This means the lock fails on the network share and OO3 goes into Read-Only mode. I now have disabled the veto setting in samba to prevent this but I had to make sure that no other shared folder had actual hidden files (like profiles from programs etc) because somebody somewhere will be stupid some time and will try to remove those files and folders that just became visible because of the changes...
OOo 3.0.X on Ms Windows XP
cyberwizzard
 
Posts: 4
Joined: Mon Dec 22, 2008 3:18 pm

Re: OO3 opens each ODT as read-only (on network share)

Postby acknak » Mon Dec 22, 2008 7:17 pm

Ok, but dot-files on Unix are not hidden except by applications that choose to, like "ls". Otherwise, they are absolutely normal files. They are not "hidden" at the system level at all.

If Windows has different rules for dealing with its files that have the "hidden" attribute, so that programs can't even read the files or see if they exist, then Samba's mapping is the real problem here: it's mapping apples to oranges. No wonder there's a problem.

You may want to investigate further. I've seen postings (here, maybe?) that mentioned a different Samba option that avoids files like this being shown to the user, but not preventing programs from working with them. I may have misunderstood, but I think that was the gist of it.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: OO3 opens each ODT as read-only (on network share)

Postby cyberwizzard » Tue Dec 23, 2008 1:18 am

I know, but Windows only hides them in certain ways - much like graphical file explorers under linux (Dolphin) won't show dot files unless you tell it to.

But the problem here is 2 fold:
The solution to showing dot files is indeed to make samba auto-hide dot files by telling Windows they are hidden (set the hidden file attribute on a file starting with '.' ).

The main problem however is the fact that the default CentOS configuration (and perhaps other distros) is to disallow the creation, access and viewing of dot files on the shares of Samba. This means that if you use a Windows or Linux computer and SMB to get to your shared files, OpenOffice will now always fail to open the file normally as the lock file is not permitted to be created.
OOo 3.0.X on Ms Windows XP
cyberwizzard
 
Posts: 4
Joined: Mon Dec 22, 2008 3:18 pm

Re: OO3 opens each ODT as read-only (on network share)

Postby acknak » Tue Dec 23, 2008 2:50 am

Ok, I think I've got it now. Thanks for the explanation.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to MS Windows

Who is online

Users browsing this forum: No registered users and 8 guests