MacOS X & File Locking

StarBuck

Registered
MacOS X & File Locking

Does anyone know if MacOS X supports File Locking as I am trying to find out if I can run a Access Accounts Database file off of a MacOS X Server 10.1.3 I spoke to Access Tech support desk but no real help in answering my question.


Has anyone tried it ?

At the moment I am running a ASIP 6.3.3 Server this works fine to my knowledge I believe Mac OS 9 does not support file locking?

Thanks

Also what is file locking ????
 
I know the answer but it's not going to help you. :(

When a programmer gets a file handle (a reference to the file) he decides at that point if he wants a read or read/write handle on the file (actually there are more options but that's the jist of it). Several people can have a read only handle on the file but only one can have read/write access.

If I have read/write access it's locked.

A database system typically gets around that by have the system run as a single user and then that user does all the writes. So, if a dozen of us our writing to the db we're actually telling the process that owns the lock to do it, not obtaining our own lock.

So, if access works as a multi-user db (in the old days it couldn't but that may have changed) you're fine. If it can't, you need to choose a better database.

If you're interested, any problems you have with access will not be caused by osx. OSX uses the same file locking strategy that every other unix uses. It's same as the locking systems that run the worlds largest corporations.
 
At the moment the file works ok on a AppleShare IP Server with three users accessing it.

When I spoke to the support desk at Access Accounts I was told it would not work on mac os x as it was a multiuser system.

I'm going to try it out on monday this week.

Do you know if MacOS 9 supports file locking?

As I cannot see any reason why it will not work under OS X.

Thanks again
 
i suppose you are talking OS X server, and Windows file sharing:

In that case: OS X server uses SAMBA for its file sharing. SAMBA has several options you can set to either enable / disable file locking, and inbfluence its behaviour. Of course, Access itsself will take care of locking within the file as far as the "normal" access behaviour is concerned.

although vanguards answer goeds into the right directorion, SAMBA has locking options that WILL override any programmers good or bad intentions as far as the OSX win file sharing is concerned.

The reports of SAMBA locking are quite various, and problematic at times., you should do some testing before actualy taking the combination into production, although you should expect little or no problems with the basic locking scheme used with access tables.

Take a look at www.samba.org for the full samba documentation. Also, go to www.google.com and do a search on +"samba" +"locking" +"problem"
 
The Client Mac's are running a mixture of MacOS 8.6 and 9.1.

As you can imagine Access Accounts where not very helpful they suggest running the data files off of a windows NT Server.
 
Back
Top