LinuxQuestions.org
Visit Jeremy's Blog.
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-06-2003, 11:49 PM   #1
digimike
LQ Newbie
 
Registered: Mar 2003
Location: Kiribati
Distribution: Mandrake 9.0 / SUSE 7.0
Posts: 13

Rep: Reputation: 0
Question How to tell Samba not to lock files ?


Help needed.....
I installed a network today with Mandrake 9 and Samba. Samba is Domain controller and 16 XP pro workstations log on correctly. On the Server, there is an Access (MDB) database which is opened by another Access program from the workstations. So far, only one user can open it. Someone else try's to open it as well, a message appears that the file has been opened allready.
I have Locking = off in the samba.conf but still does not work.

Any Ideas ???
 
Old 04-07-2003, 08:37 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
There is a great chance that it is not (only) a samba related problem.

Double check that the mdb file and the DIRECTORY where the mdb file resides are both writeable for all users concerned.

Double check file creation modes: the ldb file that one user's MSAccess creates must be writeable for other users, too.
 
Old 04-08-2003, 09:42 PM   #3
digimike
LQ Newbie
 
Registered: Mar 2003
Location: Kiribati
Distribution: Mandrake 9.0 / SUSE 7.0
Posts: 13

Original Poster
Rep: Reputation: 0
Share Violation if as Domain not when Workgroup

Still could not get program working. Found that when Samba is configured as Share-Level, i can use the program. In samba log, i see that user "nobody" is closing file. If i use Samba as Domain controller, there is no "nobody" to close it and after log entry "Check_share_mode(502)" the next entry sais Share violation on file ... Fcbopen = 0

The file is KLIS.mdw . I do not have problems accessing the same MDB without a MDW file.

Mike
 
Old 04-08-2003, 11:06 PM   #4
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
have you tired veto oplocks file = /*.mdw/ ?

Last edited by turnip; 04-08-2003 at 11:10 PM.
 
Old 04-08-2003, 11:15 PM   #5
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
I have no problem with msaccess files and samba user level security:
1. I created a unix workgroup containing all users that will access the database,
2. granted rwx access for this unix work group to all directories and database files (including mdws), however setting the sticky bit on the directories, so as not to allow users accidentally delete the database files
3 created the share in smb.conf, and granted rw access to it for the workgroup, also setting up the adequate file creation modes. Note: file creation modes are very important as ldb files are continuously created and deleted by msaccess, and while they exist, they should be writeable for all users, not for just the one who created them.
I found in practice that msaccess2000 'clients' can do without a writeable mdw file (and directory), but msaccess95 clients give an annoying error message on startup (why do they want to write to the mdw? who knows...) when the mdw file is not writeable for them.
If you did everything as described above, and still have the error, I have no more ideas.
(Maybe an msaccess client opens the mdb or mdw in exclusive mode? But that would be an msaccess issue...)

Last edited by J_Szucs; 04-08-2003 at 11:28 PM.
 
Old 04-11-2003, 01:49 PM   #6
digimike
LQ Newbie
 
Registered: Mar 2003
Location: Kiribati
Distribution: Mandrake 9.0 / SUSE 7.0
Posts: 13

Original Poster
Rep: Reputation: 0
Problem solved... I created a fake user and then added FORCE USER = fake to the conf file and all worked.

mike
 
Old 04-11-2003, 11:50 PM   #7
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
The FORCE USER option is OK, it has the same effect as joining everyone to a workgroup and granting the necessary permissions for the workgroup.
I would, however, advise you to make use of the sticky bit somehow. It is MUCH safer if users do not have permissions to delete the mdb and mdw files.

Last edited by J_Szucs; 04-11-2003 at 11:55 PM.
 
Old 08-06-2004, 07:25 AM   #8
Qcon04
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Rep: Reputation: 0
FAKE USER

was that added to the sbm.cfg file?

GR
 
Old 08-08-2004, 09:49 PM   #9
Pdeblanc
LQ Newbie
 
Registered: Aug 2004
Location: Western Australia
Posts: 3

Rep: Reputation: 0
New and confused

Hello all
alas I am new at the Linux, have worked in JCL, Windows, Dos, Mac...
Now I am embracing Linux and am amazed at it capabilities.

Perhaps I am too ignorant to understand simple things but I just loaded
Mandrake 10 on my laptop and am trying to share it to on my Win based network
that have a Linux firewall/server but am unable to work it out.

Would any of you good people be so kind as to offer me some assitance please?

Regards
Pdeblanc

__________________
Compco Technologies Pty Ltd
Computer solutions
http://www.compco.biz

Quo Vadimus
 
Old 08-08-2004, 10:05 PM   #10
Pdeblanc
LQ Newbie
 
Registered: Aug 2004
Location: Western Australia
Posts: 3

Rep: Reputation: 0
Is my question that lame that no one will offer me any assitantce?
If this is true then would you good people at least let me know
where I might be able to get som answers?
Regards
Pdeblanc
 
Old 01-28-2009, 02:25 PM   #11
ralph33112
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
I ran into the exact same problem having a MS Access file on a Ubuntu Server. Only one person could access the database at a time. The suggestions by J. Szucs were very helpful and worked. I changed the following lines in the samba.conf file to:

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
username map = /etc/samba/smbusers

#======================= Share Definitions =======================

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0775

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775

path = /media/raid/ubuntu_share/dellRoot/Shared Folder
writeable = yes
browseable = yes
guest ok = yes
 
Old 01-29-2009, 03:55 PM   #12
ralph33112
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
I was still having a MS Access Lock file error after my last posting. In the mean time I added the following to my smb.conf file:

force group = workgroup
create mask = 0770
force create mode = 0770
directory mask = 0770
force directory mode = 0770
directory security mask = 0770
security mask = 0770
force security mode = 0770
force directory security mode = 0770

I have a Ubuntu server with both Mac and PC clients. The Mac's use Sun's VirtualBox with Access loaded. The PC's are as usual with MS Office installed.

The MS Access file lock problem I thought was corrected after I added create mask = 0770 and directory mask = 0770 to the smb.config file. After checking both the PC's and Mac's, after one of these machines loaded up the MS Access file, the lock was still present, because MS Access created a file with the same name with a *.ldb extension. THIS FILE NEEDS TO BE -wrxwrx--- for the whole group of users! For some reason, SAMBA with only create mask = 0770 and directory mask = 0770 created this file as -wrxwr---- ! After using the force...* commands above in the smb.conf file, the *.ldb file was -wrxwrx--- . I hope this is helpful to the group.
 
  


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
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 24 04-12-2019 10:42 AM
Caps Lock and Num Lock leds dont work! npc Linux - Hardware 2 11-08-2005 10:40 AM
Samba lock file in NT tecnologies CarLost Linux - Networking 0 06-18-2004 07:14 PM
can anyone tell me hoy to lock unwanted attached files in sendmail? jastorqu Linux - Networking 0 06-17-2004 12:05 PM
How to Lock Files (/etc/passwd /var/spool/[user] Larry James Programming 3 12-04-2000 11:06 AM

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

All times are GMT -5. The time now is 08:34 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
Open Source Consulting | Domain Registration