[Samba] Samba + MS Access
Dan Weisenstein
dan at tesoro.com
Thu Jun 17 16:41:46 GMT 2004
ARG!! Well, I put 'force user = database' onto the smb.conf file,
stopped and restarted smb and I still get the lock file owned by the
user with permissions of 644. It's almost as if smb is ignoring the
smb.conf file.
Here is the output of smbstatus:
Samba version 3.0.4-SUSE
PID Username Group Machine
-------------------------------------------------------------------
4251 dan users rendering (192.168.1.55)
4253 heidi users heidi-front (192.168.1.220)
Service pid machine Connected at
-------------------------------------------------------
shared 4253 heidi-front Thu Jun 17 09:34:05 2004
shared 4251 rendering Thu Jun 17 09:32:55 2004
Locked files:
Pid DenyMode Access R/W Oplock Name
--------------------------------------------------------------
4251 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /shared/Access/Customer
Tables.ldb Thu Jun 17 09:32:55 2004
4251 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /shared/Access/Customer
Tables.mdb Thu Jun 17 09:32:55 2004
Dan
John Mazza wrote:
>Try putting a "force user = " line into the share. I've had to do that a time or two when
>sharing databases -- it seems that each user tries to chown the file. Force User prevents
>this by having all accesses at the filesystem level appear to come from the same Unix user
>(doesn't affect permissions of Samba users).
>
>------------------------
>
>It may be a good idea to create a special Unix account for this purpose...
>
># useradd database
>
>Set the "database" user's login to /sbin/nologin as it doesn't need shell access.
>
>Then do
>
># chown -R /shared/Access database
>
>-----------------------
>I believe MS Jet specifies the permissions of LDB files and overrides the server's defaults
>when it does so.
>
>This is the only way I was able to make Act! databases play nicely over Samba 3.x shares,
>and suspect that MS Access is behaving in a similar fashion.
>
>Please let me know how it works.
>
>
>
>
>I added a "force user" line into the configuration you posted below. Change the
>"<username>" entry to a valid user on your system and life should be good.
>
>
>
>On Thu, 17 Jun 2004 08:36:35 -0700, Dan Weisenstein wrote:
>
>
>
>>Well, so far I'm not having much success. The weird thing is that no
>>matter what settings I put into smb.conf, the lock file gets created
>>with permissions of 644. Here is the section in question:
>>
>>[access]
>> force create mode = 0777
>>
>>
> force user = <username>
>
>
>> create mask = 0777
>> directory mask = 0777
>> force directory mode = 0777
>> available = yes
>> browseable = yes
>> read only = yes
>> write list = dan,tesoro,heidi,sue,inventory
>> locking = yes
>> strict locking = no
>> level2 oplocks = no
>> oplocks = no
>> comment = "Access"
>> guest ok = no
>> path = /shared/Access/
>> veto oplock files = /*.mdb/*.xls/*.ldb/*.LDB/
>> dos filetimes = yes
>>
>>As you can see, new files should be created with perms of 777. I do a
>>/etc/init.d/smb stop and then start and new files still get created
>>(from the XP client) with perms of 644. Even after a reboot of the
>>server. What am I doing wrong??
>>
>>Dan
>>
>>
>>brucehohl at access-4-free.com wrote:
>>
>>
>>
>>>From: Dan Weisenstein <dan at tesoro.com>
>>>To: samba at lists.samba.org
>>>Subject: [Samba] Samba + MS Access
>>>Date: Tue, 15 Jun 2004 11:42:50 -0700
>>>
>>>----- Original Message Follows -----
>>>
>>>
>>>
>>>
>>>>I have a single Linux server running SuSE 9.1 and Samba
>>>>3.04. I have one share that has several MS Access tables
>>>>on it. One user can operate just fine, however when a
>>>>second+ user tries to access the same database tables,
>>>>one of several things happens depending on what I have in
>>>>the smb.conf file. It's usually a permission denied, or a
>>>>"can't lock" type of error.
>>>>
>>>>When the first user opens a table, a file called xxx.ldb
>>>>gets created, where xxx is the name of the table. The
>>>>lock file is owned by the user and has permissions of
>>>>644. When a second user tries to open the same table, the
>>>>error occurs. In my smb.conf file, I have tried almost
>>>>every option I can find that would apply to file locking,
>>>>including turning on and off kernel oplocks, level2
>>>>oplocks, oplocks, and setting veto oplock files to
>>>>/.ldb/.mdb/ and all possible permutations of all of them.
>>>>Nothing really changes with any of them. If I force the
>>>>lock file to 666, Access hangs.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>I saw this in a Samba book by Gary Wilson. Maybe it will
>>>help (p83):
>>>"To configure a share for [Access] database that is readable
>>>by all users but can be modified by a few users ... "
>>>[share]
>>>path = /path/to/share
>>>read only = yes
>>>write list = user1, user2, @sales
>>>create mask = 0666
>>>directory mask = 0777
>>>force create mode = 0666
>>>force directory mode = 0777
>>>oplocks = no
>>>veto oplock files = /*.mdb/*.MDB/*.ldb/*.LDB/
>>>dos filetimes = yes
>>>
>>>It was for Samba 2.2 but maybe it will help.
>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>Dan Weisenstein
>>General Manager
>>Tesoro Electronics
>>715 White Spar Road
>>Prescott, AZ 86303
>>928-771-2646
>>
>>--
>>To unsubscribe from this list go to the following URL and read the
>>instructions: http://lists.samba.org/mailman/listinfo/samba
>>
>>
>
>
>
>
--
Dan Weisenstein
General Manager
Tesoro Electronics
715 White Spar Road
Prescott, AZ 86303
928-771-2646
More information about the samba
mailing list