[Samba] Samba + MS Access

John Mazza maz at maznets.com
Thu Jun 17 15:50:48 GMT 2004


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




More information about the samba mailing list