Link to home
Start Free TrialLog in
Avatar of donm110599
donm110599

asked on

Shareing Access97 Files

I know that you cannot operate Access with Linux but you can use it as a file server.  I have Redhat6.0 with samba 2.0.3. on a server.  I have attached 14 PCs running Win98 and am able to share files one at a time.  I placed Access97 on each PC with programs.  I placed Access97 database on the server.  One person can attach to the Access97 and operate just as if it was through another Windows PC.  When the second PC attempts to attach to the database I get an error that the file is in use and cannot be shared.  When the other PC closes Access you can then get in with the second PC but then the first cannot get in.  I have a group permissions set for both PCs in the folder and have stated oplocks = no share = yes.  What am I doing wrong.  This is also occuring with Outlook97 with the files on the server and the programs on the Win98 PCs - Thanks for you help.
Avatar of mgoergen
mgoergen

Just a comment

Why don`t you use a database instead of Access :-) ?

You can then connect via odbc to the database and you will find out that this solution is much better then sharing and working on an access file. I guess by using 14 PC there will be much work and so a better databse then access would be the much better solution. Also it`s much easier to give spcecial users differents rights and security should always be a point.

Look out for mysql you will find everything including odbc driver

Bye
Mirko
Avatar of donm110599

ASKER

We have considered this but have so much invested in Access with all of the forms and programing that is is prohibitive at this time.  We looked at Star Office with the hope that we could port directly with minimum changes but this only true with their word processor and spread sheet. The only thing that ports for the database is the data.  We have to manually rebuild our other stuff.  The plan is to convert the server to Linux and use it as a file server then after successful history, convert the components of word processing, spreadsheet and finally database.  After that we could convert all of the PCs to Linux and leave the Windows world.  Everyone said that Linux would work as a file server but so far I have been stopped with the first step.  I is not possible to change everything at the same time and still run an operations successfully.
I have a similar configuration set up and working very nicely for a small office (less than 10 users).  There are 2 steps that should make the difference for you.  

First, add this option to the share definition in smb.conf: forcegroup = "anynameyouchoose"  (Make sure you have that user/group name defined in Linux networking ahead of time)

Second, define permissions such that the directory and files of the share location are owned recursively by the same user and group (using chown -R and chgrp -R commands if necessary) and also that full access is granted to the group name as well (eg., chmod -R 775 "directory")

If Samba is functioning for you otherwise than you should be all set after taking these steps.
I added this forcegroup in the top of the smbconf and it changed my problem.  Now the Access will not start in single user mode.  It just sits there until the windows show that it has stopped responding.  The way it used to work it would open in the first PC but the second PC would get a Access Run time error 3045 File already in use, even though the Access was not opened exclussively.  
Is there somewhere else I should add this statement.  Also did I need to put quotes around my group?
You do not need quotes, but after reading your original statement again, I believe you need to remove the OPLOCKS = no statment.  This will prevent ACCESS files from being shared properly.  The Forcegroup statement needs to be in the share definition, not the Global definitions.  Did you define permissions for the file/directories as I outlined?
The permissions are set correctly.  If they were not, each PC individually could not open the database.  I set them into a group and the group has permission to do anything with the files.  I moved the forcegroup to the share definition section. Oplocks has been set to "yes" and share modes = yes also.  There is no locking specified and no locking directory specified.  

Now I can bring up the database individually as before but when the second PC tries to sign on I still get an Access error 3045 that the file is in use.  This indicates that the database was opened "exclussively" but it was not.  I can recreate this error in a strictly Windows envioronment by opening a database "exclussively" and then attempting to open it from another PC.  There has got to be a way in samba to open as you do in Windows.  The file "ldb" that keeps track of records being used by any one individual is still being used in the Linux situation, so that it is prepared to track the sharing but it just does not understand the sharing of the database.  This is also true with Outlook if I use the Linux server as the postoffice for Outlook.  It does not want to share these files either.  These are poled every 10 minutes for mail and we get error that someone else is using the file.
OK, well then, do you have an Access Workgroup defined and do all users login with permissions as specified within the Access database?
Yes, all are members of a group that have permission for the database and each can open the database individully with out any permission or locking issues.  It is only when one person is already open in the database do any subsequent attempts to open the database fail with this file not available.
ASKER CERTIFIED SOLUTION
Avatar of ekarjala
ekarjala

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your answer worked wonderfully.  I appreciate your staying with me on this one.  I could not believe that this was not fixable but I had been to just about everywhere with no success.  This was a split database as you asked.  The changes I had to make to my setup was

    only user = no
    create mask = 0777
    force create mode = 0777
    directory mask = 0777

I don't know what the 0777 answers were but I wonder about the only user = no being the real answer to the problem.  I am also going to try this on the directory that holds the Outlook Postoffice and see if it allows those files to be shared.

Again thanks for your help.  I put this question to two different services at the same time and you came through with flying colors.  You're great!!!!!  I was almost ready to abandon Linux.
I am glad that this worked out for you and that you didn't give up on Linux.  I have found great satisfaction in using Linux/Samba to do what would cost more than $2000 with Windows NT.  The 0777 commands are defining permissions for the share (like the command chmod 777 in your text shell) so that there is full read and write access but restricted to that particular session.  Keep exploring what Linux can do.