LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to tell Samba not to lock files ? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-tell-samba-not-to-lock-files-53778/)

digimike 04-06-2003 11:49 PM

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 ???

J_Szucs 04-07-2003 08:37 PM

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.

digimike 04-08-2003 09:42 PM

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

turnip 04-08-2003 11:06 PM

have you tired veto oplocks file = /*.mdw/ ?

J_Szucs 04-08-2003 11:15 PM

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...)

digimike 04-11-2003 01:49 PM

Problem solved... I created a fake user and then added FORCE USER = fake to the conf file and all worked.

mike

J_Szucs 04-11-2003 11:50 PM

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.

Qcon04 08-06-2004 07:25 AM

FAKE USER
 
was that added to the sbm.cfg file?

GR

Pdeblanc 08-08-2004 09:49 PM

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:Pengy: :Pengy:

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

Quo Vadimus

Pdeblanc 08-08-2004 10:05 PM

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

ralph33112 01-28-2009 02:25 PM

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

ralph33112 01-29-2009 03:55 PM

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.


All times are GMT -5. The time now is 02:34 AM.