Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - FILE LOCKING / prevent editing while file open by other user
FILE LOCKING / prevent editing while file open by other user
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
LAW
Guest





PostPosted: Thu Jan 27, 2005 10:03 am    Post subject: FILE LOCKING / prevent editing while file open by other user Reply with quote

I have a problem that is driving me crazy. I need MS Word style document locking to work, as currently multiple users are able to opne the same file and overwrite each other!

While the OpenOffice project site says I need only add the line "SAL_ENABLE_FILE_LOCKING=1" to the config file, I am unable to locate this file within NeoOffice/J. Can anyone tell me where this file is so that I may edit this pref?

I looked at the forums and found no direct reference to this config file. Any help would be highly appreciated.

Thanks!

Stephen
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Thu Jan 27, 2005 9:52 pm    Post subject: Reply with quote

I did a search for "SAL_ENABLE_FILE_LOCKING=1" using Google and found that this isn't a configuration file entry at all. Instead, "SAL_ENABLE_FILE_LOCKIN" is an environment which makes me think that the "config file" that you mentioned is one of the custom shell scripts that are used on various Linux distributions of OOo.

So, the question is, how can you pass an environment variable to Neo/J? I don't have the answer but maybe someone else does? The problem that I see is that the Mac OS X Finder will only pass the minimum number of environment variables when lauching an application. This is the opposite of Linux where you usually start an application by executing a shell script that has all of your custom environment variable settings in it.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu Jan 27, 2005 10:32 pm    Post subject: Reply with quote

http://rubicode.com/Software/RCEnvironment/ Question

Or is one of these some different environment?

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
Max_Barel
Oracle


Joined: May 31, 2003
Posts: 219
Location: French Alps

PostPosted: Fri Jan 28, 2005 4:35 am    Post subject: Reply with quote

sardisson wrote:
http://rubicode.com/Software/RCEnvironment/

And the Readme of this pane show the core answer :
Code:
~/.MacOSX/environment.plist file

(Though I didn't test the locking feature)
Back to top
View user's profile Send private message Visit poster's website AIM Address
RCEnvironment Author
Guest





PostPosted: Fri Jan 28, 2005 8:53 am    Post subject: RCEnvironment should solve your problem Reply with quote

Hi,

I wrote RCEnvironment, and was asked to comment on this issue. From the little I've read here, it does look like RCEnvironment could solve the problem you are looking at.

Here's how to make sure that RCEnvironment would help. Open up a shell window in Terminal. Set the SAL_ENABLE_FILE_LOCKING variable to what value you want, using setenv (csh) or export (sh) to make sure it'll be passed to commands you run. Then, from Terminal, run Neo/J.

If Neo/J behaves like you want it to, then its definitely picking up that value from the environment, and RCEnvironment can help you out. Just setup the varible in RCEnvironment, save it, log out and log back in, and it should work.

Any problems with RCEnvironment, and feel free to contact us.
--
Doug McClure
http://www.rubicode.com/
Back to top
Terry Teague
Guest





PostPosted: Sat Jan 29, 2005 1:13 am    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

LAW wrote:
I have a problem that is driving me crazy. I need MS Word style document locking to work, as currently multiple users are able to opne the same file and overwrite each other!

While the OpenOffice project site says I need only add the line "SAL_ENABLE_FILE_LOCKING=1" to the config file, I am unable to locate this file within NeoOffice/J. Can anyone tell me where this file is so that I may edit this pref?

While it may not apply in your situation or to NeoOffice/J, you may want to be aware of a known problem with file locking and OpenOffice.org on Mac OS X.

See :

http://www.openoffice.org/issues/show_bug.cgi?id=29284

Regards, Terry
Back to top
darbycrash
Guest





PostPosted: Mon Feb 07, 2005 12:03 pm    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

So I have installed RCEnvironment on two systems on my network and entered the variable "SAL_ENABLE_FILE_LOCKING" and gave it a value of "1" on both systems. This did not resolve the issue so then I added the variable "EXPORT_SAL_ENABLE_FILE_LOCKING" and set the value to "1". This had the effect of crashing my NeoOffice each time I try to access a file off the network. What am I doing wrong? Can anyone help, this is driving me crazy.
Back to top
Guest






PostPosted: Tue Feb 08, 2005 1:25 am    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

darbycrash wrote:
So I have installed RCEnvironment on two systems on my network and entered the variable "SAL_ENABLE_FILE_LOCKING" and gave it a value of "1" on both systems. This did not resolve the issue so

I'm not convinced this feature is actually implemented (correctly) on Mac OS X, so you might be out of luck. Or your issue is some other problem, that "SAL_ENABLE_FILE_LOCKING" doesn't solve.

darbycrash wrote:
then I added the variable "EXPORT_SAL_ENABLE_FILE_LOCKING" and set the value to "1". This had the effect of crashing my NeoOffice each time I try to access a file off the network. What am I doing wrong? Can anyone help, this is driving me crazy.

I would say "EXPORT_SAL_ENABLE_FILE_LOCKING" is wrong and essentially has the same effect as not setting any variable. I can't tell if you were having this crash problem (given all else being equal) before you started adding these shell environments variables.

And can you be more precise by what you mean by "crash"? I could believe you might get a "General I/O error" or maybe even a "Unrecoverable error" (at least this is what OpenOffice.org would do; I don't know how NeoOffice/J would present the error).

What are the details of your environment regards the networked access to files? i.e. is the NeoOffice application on a local hard drive, or on a network volume; are your data files on a local hard drive, or on a network volume; if a network volume, what kind - AppleShare (AFP), NFS, etc? Access rights?

I don't think necessarily you are doing anything wrong, but maybe there isn't a solution. Providing lots more info would help with troubleshooting.

Regards, Terry
Back to top
darbycrash
Guest





PostPosted: Tue Feb 22, 2005 5:28 pm    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

I had read on another thread that for OpenOffice, in order to get file locking to work one had to enter the shell commands SAL_ENABLE_FILE_LOCKING=1 and export SAL_ENABLE_FILE_LOCKING. I was trying to adapt this info into RCEnviroment with the steps that I mentioned in my previous post, but setting the variable to "SAL_ENABLE_FILE_LOCKING" and the value to "1" on two systems that are both usding NeoOffice/J didn't fix the file locking issue.

So then I just decided to try setting "EXPORT_SAL_ENABLE_FILE_LOCKING" as a variable and setting the value to "1". So now I had both commands set in RCEnvironment at the same time. After I restarted the system I tried to open a NeoOffice document off the network and this caused NeoOffice to shut down and it would just say "Unrecoverable Error". This problem when away when I removed the "EXPORT_SAL_ENABLE_FILE_LOCKING" command which tells me that that command was incorrect. I expected that command to be incorrect, but I felt it was worth a try.

Anyway, I'm still in the same boat. Users are still able to write over each others documents and I'm running out of ideas. Any other suggestions?
Back to top
Terry Teague
Guest





PostPosted: Wed Feb 23, 2005 2:09 am    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

darbycrash wrote:
Anyway, I'm still in the same boat. Users are still able to write over each others documents and I'm running out of ideas. Any other suggestions?

It is not clear to me what you are actually trying to do. Are you the person (LAW) who started this thread, or someone else?

Perhaps you could describe in detail your environment and usage of NeoOffice/J (as I asked previously...), so we can better help you. Otherwise we are just guessing.

Regards, Terry
Back to top
jonny>
Guest





PostPosted: Mon Feb 28, 2005 3:28 am    Post subject: Reply with quote

Hello. I have the same problem as LAW. After reading through the replies to his post, I'm not sure of a solution, so I will detail my situation also.

We wish to run NeoOffice/J on some OSX machines on our network, and Office X on others. As LAW described, presently Word X and NeoOffice can open and overwrite files stored on the server that are being worked on by other users. In order to prevent this, I would like to enable file locking when NeoOffice has files in use. Also, it would appear that NeoOffice will have to be able to detect that Office X has files open.

I would be most grateful for any help anyone can give. We are hoping to move our OS9 Machines to OSX and NeoOffice/J seemed to be an excellent alternative to Office X. This problem, however, could stop using using NeoOffice at all.
Back to top
Terry Teague
Guest





PostPosted: Mon Feb 28, 2005 12:57 pm    Post subject: Re: File locking Reply with quote

jonny> wrote:
Hello. I have the same problem as LAW. After reading through the replies to his post, I'm not sure of a solution, so I will detail my situation also.

We wish to run NeoOffice/J on some OSX machines on our network, and Office X on others. As LAW described, presently Word X and NeoOffice can open and overwrite files stored on the server that are being worked on by other users. In order to prevent this, I would like to enable file locking when NeoOffice has files in use. Also, it would appear that NeoOffice will have to be able to detect that Office X has files open.

I would be most grateful for any help anyone can give. We are hoping to move our OS9 Machines to OSX and NeoOffice/J seemed to be an excellent alternative to Office X. This problem, however, could stop using using NeoOffice at all.

Sorry guys, I'm trying to help, but since I don't use OOo or NeoOffice in a multi-user environment, I need more details so I can at least reproduce the issue.

Some questions :

1) Is OOo or NeoOffice installed in /Applications on the local hard drive, and can each user successfully launch and use OOo/NeoOffice (except for the file sharing),

or is OOo or NeoOffice installed on the file server, and can each user successfully launch and use OOo/NeoOffice (except for the file sharing)?

2) What kind of file server and type of volumes being shared - AppleShare or Mac OS X Server (AFP, HFS volumes), UNIX server of some kind (UFS volumes), NFS, WebDAV, etc?

3) What sort of access privileges (to OOo/NeoOffice and the file server) does the account that set up OOo/NeoOffice have?

4) What sort of access privileges (to OOo/NeoOffice and the file server) do the users of OOo/NeoOffice have?

5) Why would users overwrite other user's files - because these are common files that everyone must access, or the users are malicious, or other?

6) Any other information that may be relevant. Detailed info on where files are located, and the permissions of the files and directories, would be helpful.


As I said earlier, it is entirely possible that file locking doesn't work on the Mac OS X version of OOo/NeoOffice, and you might be out of luck, except for putting some kind of OOo/NeoOffice usage policy in place.

Regards, Terry
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon Feb 28, 2005 3:30 pm    Post subject: Re: FILE LOCKING / prevent editing while file open by other Reply with quote

LAW wrote:
I have a problem that is driving me crazy. I need MS Word style document locking to work, as currently multiple users are able to opne the same file and overwrite each other!

...

I looked at the forums and found no direct reference to this config file. Any help would be highly appreciated.


Hmm. Is there any way that your fileserver (assuming you have one) can manage locking? I know there are DAV specs about this, but not if these have been properly implemented on a standard Mac OSX install.

Good luck and by all means post your eventual solution. Also, feed Terry all the information as he asks for. Greatly increases the chances he'll come up with a way around your problem.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
jonny>
Guest





PostPosted: Tue Mar 01, 2005 5:51 am    Post subject: Reply with quote

Many thanks for your replies, guys. I'll try to give you more background info before answering your questions, Terry.

We run a network of several Mac clients running OS 10.3.8 connecting to a OS 10.3 server. All applications are installed on the client computers' own hard drives. Users work on files stored on the server. All users have both read and write access to the directories those files are stored in. The problem is this - user A may have a Word file open in Office X, and user B is still able to open this file using NeoOffice, and make changes. Depending on which user saves first, one user's changes are lost. This also applies if both users are running NeoOffice.

So to solve this problem we need NeoOffice to be able to detect that a file is already open. Word does this, giving a user the message "File is already being used by . Do you want to open a read-only copy?"

Alternatively, as ovvidc suggests, it may be easier to implement server-side filelocking. What are DAV specs, and do they apply now you have a better idea of our setup? Smile

So to answer your questions, Terry:

1) NeoOffice installed on client machine hard disks. Yes.

2) Mac OS 10.3 Server. The drive being shared is formatted in Mac OS Extended (Journaled) being shared using AFP.

3) To the fileserver, users have Read-Write priviledges and to NeoOffice, admin.

4) The same account as for question 3).

5) Unwittingly opening a file stored on the server at the same time as another user. Yes, these are common files that everyone must access.

6) All files on that sharepoint are Read-Write to all members of the group "staff" which everyon eis a member of.

Thanks for you help so far.
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Tue Mar 01, 2005 12:21 pm    Post subject: Reply with quote

jonny> wrote:
Alternatively, as ovvidc suggests, it may be easier to implement server-side filelocking. What are DAV specs, and do they apply now you have a better idea of our setup? Smile


DAV could help you, as far as I can tell. But after repeated tries I have never been able to get it running on my iBook Sad. For more info, see http://www.webdav.org/. About mod_dav, the part of your Apache server that does dav for you, it says:

Quote:
mod_dav currently implements a Class 1 and Class 2 DAV server. This means that it provides all the basic DAV facilities for manipulating resources (files) on the target web server, along with manipulating properties on those resources. In addition, it handles the (un)locking of resources so that clients can have exclusive access to modify resources.


But again, it fails for me, somehow.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds