LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2004, 04:09 PM   #1
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Rep: Reputation: 15
Samba / File locking question


Hi,

I have an application which uses a certain Access database in windows.

I need two users to use the same database file from different machines, (we are controling who updates by code).

If I set the database in a samba share, the second user wont be able to open the file, not even in read only.

How can I change this?

If I set the same on a shared directory in windowze it works fine.
 
Old 04-02-2004, 01:07 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
The reason for this is so 2 users wont be writing partially complete files to the same file.

I don't know how you are doing this in windows.

Samba is for sharing directories that are mounted with a windows machine or 2 Linux machines.

Samba is like Windows shared folder program, netbios I believe please explain in detail what you are trying to do.
 
Old 04-02-2004, 05:27 PM   #3
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 15
thanks for your answer

What I'm trying to do is one of those "shouldn't do things", quite silly actually and am not proud of it.

I have a software which ussually reads and seldom writes to an access database,

because of a time/cost matter, instead of doing it by the book... i.e. reprograming the application in a multi-tier enviroment, and changing to MySQL or SQL Server or similar, I'm trying to share the same access database.
To avoid going into development.

I thougth an access database would only lock the record instead of the file, and so this appears to happen on a shared windows directory but when going into a samba directory, the whole file is blocked.

I can even open many applications with the same aplication using the same database on the local drive on the computer and Access will defend the record so that only one writes at that record at a time.

So I thougth there must be something wich is locking the file within Samba.

I know there is a general parameter for file locking, but this is a general parameter and goes to all files, I only need to unlock this one or at least this share, and they recommend not to set it to off,

is there anything else I can do?
 
Old 04-02-2004, 10:25 PM   #4
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
I dont know bud, what you are doing seems to be just beyond my comprehension.

locate all file/user locks in smb.conf and remove those or something.
surely there is a way to do this. whatever it is.

Last edited by AutOPSY; 04-02-2004 at 10:28 PM.
 
Old 04-03-2004, 12:05 AM   #5
sjia
Member
 
Registered: Jan 2004
Location: Ont, Canada
Distribution: Fedora Core 1
Posts: 113

Rep: Reputation: 15
I do not comprehend what you are trying to do either. Are you having a problem with permissions in Linux?
 
Old 04-13-2004, 04:06 PM   #6
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 15
Probably the piece you are missing is:

I have a SAMBA server, which works as a file server so that users can share files, one of these files is an Access Database File, with many tables.

If I share a directory via Windows, the file does not get locked. There is only record locking (done manually)

If I share it via Samba, it get's locked. Leaving it as a single user program even though the users might be ussing different tables.

Permissions are open in Linux/Unix and in Samba for each user

I haven't touched the file locking parameters of samba as they seem to be general parameters, and it is not advised to.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file locking problem with samba mpriddy Linux - Software 4 11-29-2004 04:00 PM
Samba File share locking problem Adam_equip Linux - Software 3 07-14-2004 09:14 AM
samba 3.0 locking ash4stuff Linux - Software 0 04-04-2004 04:50 AM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
File locking over Samba rtaft Linux - Software 0 12-30-2003 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration