| View previous topic :: View next topic |
| Author |
Message |
naxfen General User

Joined: 21 Mar 2006 Posts: 7
|
Posted: Mon Mar 27, 2006 10:15 am Post subject: |
|
|
Update.
I've found this in the file sourcecode/QuickLoad/FileLocks.xba (lines 217 - 218):
| Code: | filelockName = zLib.strReplace(filelockName, " ", "__") ' replace spaces due to issues with " " and "%20" being..
filelockName = zLib.strReplace(filelockName, "%20", "__") ' ..used seemingly at random by staroffice |
and (lines 348 - 249):
| Code: | filelockName = zLib.strReplace(filelockName, " ", "__") ' replace spaces due to issues with " " and "%20" being..
filelockName = zLib.strReplace(filelockName, "%20", "__") ' ..used seemingly at random by staroffice |
So since I didn't want the spaces to be replaced, and I knew we wouldn't be using StarOffice, I commented those 4 lines out (using ' ).
By the way, I'm editing the files with gedit (Gnome Edit), since I really don't know how to work with OOoBASIC (and the editor that must come with OOo)
And it worked! No more pesky Documents__and__Settings folder not shared!
But of course, it wasn't so simple
Now, when I open a file on Windows, and I try to open it on my Linux Box, I get these errors:
| Quote: | Warning: failed to write to log file at:
'file:///home/qld/quoots/logs/quoots_all_users.log' |
(Of course, the user "qld" doesn't exist on my comp., and unless I missed something, I haven't found how to change the "all_users" log location in the quoots doc.)
| Quote: | | Warning: file-locking failed, I can't tell you if anyone else has the file open. |
| Quote: | Oops, something went wrong,
please refer this to your friendly IT person.
Error: 1, line 224 in (fileLocking). An exception occurred
Type: com.sun.star.ucb.InteractiveAugmentedIOException
Message: an error occured during file opening. Failed to lock file: file:///media/Molior_Documents/test.odt |
(Molior_Documents is the folder in which I mount the File Server (all that is under C:\Documents and Settings\All Users\Documents\ on the win box)
Any idea? Is it because the strReplace I commented is necessary, in the end? |
|
| Back to top |
|
 |
Zarius OOo Enthusiast


Joined: 21 Jan 2005 Posts: 142 Location: Brisbane, Australia
|
Posted: Mon Mar 27, 2006 7:24 pm Post subject: |
|
|
| dgermann wrote: | Zarius--
Thanks for the quick reply.
I am starting OOo in gnome from the menus, so I do not know exactly what command it uses (or how to check).
But I have seen things that say that the default is now for file locking, which was not the case in a prior version of OOo. So that might not be the trail we need to follow.
|
Hi again,
Sorry for the delay, can you perhaps open an xterminal (generally called a terminal, or xterm, or something similar) and run the "soffice" command manually?
Actually, before that, perhaps try opening a file located on the linux server from one account and then opening from a second account (both accounts being on the linux server also). Does the second opening result in a readonly file? If this is the case, then the filelocking is working, and "soffice" wont help. If it isn't, try running soffice (not soffice.bin) manually from your "<OpenOffice installation>/program" directory from an xterm. When you located the directory you will probably have to type "./soffice" to run it.
Hmm... this looks a little extreme And most likely wouldn't solve the problem, as the Windows machines probably wont run lockf on the files (if they did the filelocking would probably work anyway). But if nothing else works it might be worth a try.
| naxfen wrote: |
And for the filelockpath, I've put:
C:\Documents and Settings\All Users\Documents\quoots\file_locks\
But whenever I open a new file (and a filelock is created), the following directories are created:
C:\Documents__and__Settings\All__Users\Documents\quoots\file_locks\
|
Oops... I've fixed that problem and updated the file. I've also replied privately with more details to avoid taking over this thread
Regards,
Z. _________________ Zarius Tularial. (WinXP - OOo 1.1.4, FedoraCore 4 - OOo 2.0, RHEL4 - StarOffice 7)
Quoots - a quicker way to open your documents and fill in template details in OOo. (written in OOBasic) |
|
| Back to top |
|
 |
dgermann OOo Advocate

Joined: 17 Mar 2003 Posts: 215
|
Posted: Mon Mar 27, 2006 7:38 pm Post subject: |
|
|
OK folks, I found a solution that works for the main part.
I got the clue from the samba mailing list.
In /etc/fstab, I simply edited the mount instructions for the samba shares from smbfs to cifs. (man mount.cifs (note the dot)).
Then umount the volumes, mount -a and the files are now showing rights as rwxrwSrwt; mount reports that these mounts are rw,mand,noexec,nosuid,nodev.
I have tested this linux to linux and linux to WinXP and all gives an error message on trying to open a file another machine has open. The messages are cryptic (.ods files are corrupt, shall we try to repair; odt files need you to choose a different filter to open them), but they are locked.
However: gedit does not respect the locks, apparently does not even see them; nor does KWord.
After 2 1/2 weeks of midnights on this problem, I'm gonna go to sleep early tonight. (Right after I get the trash put out on the curb).  _________________ :-Doug. |
|
| Back to top |
|
 |
marisdembovskis General User

Joined: 26 Apr 2006 Posts: 37
|
Posted: Thu Jun 08, 2006 1:10 am Post subject: to dgermann |
|
|
Can you show your /etc/fstab file?
I have the same problem, file doesn't lock for user 2, when user 1 is editing it.
thanks |
|
| Back to top |
|
 |
dgermann OOo Advocate

Joined: 17 Mar 2003 Posts: 215
|
Posted: Thu Jun 08, 2006 5:35 pm Post subject: |
|
|
marisdembovskis--
Sure thing. This is what has been working for me:
| Code: |
//samba1/vol12 /sam/vol12 cifs rw,user,credentials=/root/.credentials,uid=usersname,gid=apps 0 0 |
Hope that helps you, marisdembovskis! _________________ :-Doug. |
|
| Back to top |
|
 |
marisdembovskis General User

Joined: 26 Apr 2006 Posts: 37
|
Posted: Fri Jun 09, 2006 2:53 am Post subject: |
|
|
Thanks for help.
Is this correct, I added last line to my file. As I understand It will not work for me.
I need to create /sam/vol12 that it will work.
Actually I don't know how to do that! , because I do't have /sam
now my /etc/fsta look like this:
LABEL=/1 / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
samba1/vol12 /sam/vol12 cifs rw,user,credentials=/root/.credentials,uid=usersname,gid=apps 0 0 |
|
| Back to top |
|
 |
dgermann OOo Advocate

Joined: 17 Mar 2003 Posts: 215
|
Posted: Tue Jun 13, 2006 7:25 pm Post subject: |
|
|
marisdembovskis--
The /sam/vol12 is an example that shows how my drive is set up. You can choose any mountpoint you like. For me, /sam is short for samba. You could use /mnt which a lot of people use for mounts.
So what you need to do is to:
| Code: | mkdir /sam
mkdir /sam/vol12
|
Or name it whatever makes sense to you.
Notice what this code I told you about does:
| Code: |
//samba1/vol12 /sam/vol12 cifs rw,user,credentials=/root/.credentials,uid=usersname,gid=apps 0 0 |
The first part (//samba1/vol12) tells it what to mount, that is, go to the machine called samba1, and mount the directory it knows as /vol12.
The second part (/sam/vol12) tells it what mountpoint you want it mounted to on your local machine.
So if your remote machine is called server1 and it has a directory called /samples, and you want to mount it at /mnt/samples, then these parts would read:
| Code: | | //server1/samples /mnt/samples |
Then before you mount -a this, you need to make sure you have directories set up using mkdir to make the directories /mnt and /mnt/samples on your local machine.
Now the third part (credentials=/root/.credentials) is to provide security. Notice that it is a hidden file in root's home directory. I have its rights set to 700 to further protect it. Man smbmount--cifs uses much the same syntax as samba.
The usersname part logs this machine in on mounting as the person who is known as usersname. Yours might be maris, I don't know what you use to login. The gid part logs the machine in as a certain group id.
Does that help? _________________ :-Doug. |
|
| Back to top |
|
 |
marisdembovskis General User

Joined: 26 Apr 2006 Posts: 37
|
Posted: Mon Jul 24, 2006 10:48 pm Post subject: |
|
|
| Thanks for help I did something like you said, just I mounted already not win server, but lin server. Because it was possible to mount, but there were a lot other problems due to samba. |
|
| Back to top |
|
 |
dgermann OOo Advocate

Joined: 17 Mar 2003 Posts: 215
|
Posted: Tue Jul 25, 2006 6:13 pm Post subject: |
|
|
Glad it worked for you as far as it did.
I am having my own samba problems just now, but once you get it, it is rock solid.
The only thing is not to use smbfs as a mounting method for linux machines--it does not lock files. Use cifs instead, it does lock files. That way, if one of you is editing the file, no one else can do so at the same time. _________________ :-Doug. |
|
| Back to top |
|
 |
marisdembovskis General User

Joined: 26 Apr 2006 Posts: 37
|
Posted: Tue Jul 25, 2006 10:03 pm Post subject: |
|
|
Interesting.
But where do you specify the cifs or smbfs in the configuration.
I did a lot of testing on locking =yes oplocks=yes strict loking=yes and stuff like this, but NFS working always break them down (the locks) so I left this Samba stuff I tried to ensure locks in different way.
I m interested in all this, because as I understand cifs could help to lock file, so SFU package would not be necessary for Win clients, which Im using now.
I would be glad to test and play with those cifs,
and report, how that thing works out.
thanks. |
|
| Back to top |
|
 |
dgermann OOo Advocate

Joined: 17 Mar 2003 Posts: 215
|
Posted: Wed Jul 26, 2006 6:01 pm Post subject: |
|
|
marisdembovskis--
Where I put that is in /etc/fstab on my linux box. I don't think there is anything to choose in Windows--it just uses Samba.
A sample line from fstab reads:
| Code: | //samba1/vol12 /sam/vol12 cifs rw,user,credentials=/root/.smbcredentials,uid=mike,gid=data 0 0
|
Does that help? _________________ :-Doug. |
|
| Back to top |
|
 |
marisdembovskis General User

Joined: 26 Apr 2006 Posts: 37
|
Posted: Wed Jul 26, 2006 11:17 pm Post subject: |
|
|
Thanks, I understootd.
Will try if there will be possibility to have testing with Samba. |
|
| Back to top |
|
 |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|