LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba and MS Access Shares (https://www.linuxquestions.org/questions/linux-software-2/samba-and-ms-access-shares-50086/)

oneiltj 03-16-2003 10:03 AM

Samba and MS Access Shares
 
Sorry - I miss posted this first in Software.

Samba and MS Access Shares ( post #1)

I have an access db that a number of people need to share. One ID can log on many times and use the db. Many ID's can't share the DB at the same time. Every ID can get to the db and write to it so long as no one else tries it. I don't think it's straight forward permissions....

mark is the owner xrw
staff is the group xrw

Should I have some one else set up as owner?

At first I thought maybe some type of share violation, now I think it may be related to mark owning the file, pam logs in and cant write to it because mark owned it first.

This is machine runs RH 8.0, Samba 2.2.7.

Thanks in advance.

-t

acid_kewpie 03-16-2003 10:20 AM

http://www.linuxquestions.org/questi...threadid=50024

do not post a question more than once, i know someone told you it would be a good idea, but it's not, trust me. just choose the forum more carefully next time. thanks

Finlay 03-16-2003 03:08 PM

well acid wasn't too helpful...

You may want to look at the access DB itself through Access. You have to configure them to be able to have multiple connections at once.

oneiltj 03-19-2003 07:06 AM

..no he wasn't, was he.

This data base existed previously on a NT server and functioned well as multi user. The only major diference is now it sits on a unix file system being shared by samba.

turnip 03-19-2003 01:54 PM

You can check the veto oplock files = /*.mdb/

You can also look at this link for information of oplocks.

http://www.oreilly.com/catalog/samba...k/ch05_05.html

oneiltj 03-20-2003 08:03 AM

That locks VERY promising.

Get back to you later.

oneiltj 04-17-2003 12:12 PM

I have the same problem.

The files are owned by mark and a group called staff and both have rwx. If another member of staff say john, attempts to use the the file he is denied. I'm wondering if it's because Mark owns it?

Another though is to create a sym link and point the users to the sym link...

Does anyone else have experience shareing databases under samba?

J_Szucs 04-17-2003 05:17 PM

Check this thread:
http://www.linuxquestions.org/questi...threadid=53778

shannonp 08-31-2003 06:47 AM

So is this thread still being monitored??

I am having the same issues....but think I have pinpointed the exact problem, heres an example of my scenario:

I have set up a Samba Domain where I store "records.mdb" which is stored in "/Shared".

"/Shared" and all files stored within are owned by "ntuser" and belongs to group "ntusers", the group "ntusers" have full read write access.

"User1" and "User2" both belong to group "ntusers" which gives them full access to "records.mdb".

This is fine.....now,

Lets say User1 is logged in...this in hand creates "records.ldb" where attributes change so that only the owner has full access. People belonging to the group "ntusers" ONLY have read only access so when User2 tries to log in, it too tries to add itself to "records.ldb" but because only User1 has write access the database bombs out for User2.

I have been able to get past this by going to the server and changing the permissions so that group "ntusers" has full access to "records.ldb" but this is only temporary because ldb files are static so the same problems occurs next time around.

How do you tell Samba to keep group permissions on files in a group share when created by a particular user (as I think this is the primary problem)??

Slightly confused? I am?? (lol)

sidmark-2850 08-31-2003 10:25 AM

You should create or modify the smb share as follows:

[Shared]
path = <path to shared folder>
comment = Shared Directory
create mask = 0660
security mask = 0660
directory mask = 2770
directory security mask = 2770

You should also chmod the <path to shared folder> to 2770 and chgrp'ing it to the group that should have access to your folder. In your case staff. Doing this will allow the staff group to share files and have group read write access to the database and other files.

Oh! Also, chmod existing files to 0660 and folders to 2770

Cheers

shannonp 08-31-2003 06:58 PM

Ahhhh Cool...thanks sidmark! That worked perfectly!!

I have another question...lets say I have a samba domain and several XP clients connected. Can I automatically MAP shares (lets take /Shared as an example) to a particular drive letter so that when a valid domain user logs into the samba server it checks to see if "/Shared" is mapped to a drive letter? (presuming that the drive letter is available).

Would I have to use netlogon.bat to accomplish this or can I simply add something into my smb.conf?

sidmark-2850 08-31-2003 10:41 PM

oneiltj. I hope the posts answered your questions. You probably haven't implemented the change yet. I hate when people don't respond. They meek me in suspense. :D

shannonp, I am glad that it worked out. Since you are running a samba domain, it should be relatively painless to do what you asked.

First, you create a netlogon share. This share holds your scripts and the logon script parameter set. You probably have it set up already. JIC:

Code:

[global]
        ...
        logon script = logon.bat


[Netlogon]
        comment = Logon Server Share
        path = /var/samba/netlogon
        read only = yes
        write list =  shannonp, @script-managers
        create mask = 0664
        security mask = 0664
        directory mask = 2775
        directory security mask = 2775
        browseable = No

In your logon.bat file, or whatever you call it, you need to have something like:

Code:

@echo off
echo Running Windows Logon Script
echo.

if %OS%==Windows_NT goto NTMap
goto Map

:NTMap
echo You are running Windows NTx
echo .
echo Mapping Shared Drive
net use S: \\Server\Shared /persistent:no /y

goto exit

:Map
echo You are Running Windows 9x
echo .
echo Mapping Shared Drive
net use S: \\Server\Shared /persistent:no /y

goto exit


:exit
echo Executing other logon tasks

The /persistent:no parameter tells windows ntx machines not to map the drive automatically at logon. That way, if you decide remove the s or whatever drive letter you choose, nt won't try to map it even thought it is no longer in the script.

The /y parameter supresses the "S: is currently \\Server\Shared. The local device name S: is already in use" and map the drive anyway. This will NOT work if the drive letter is a local disk such as a hard drive or CDrom.

You may need to do some testing with the above script. I haven't used it in a while and I am not sure whether it works as it should on both 9x and nt. I am a bit rusty with dos. :D

Cheers.

Qcon04 08-05-2004 03:56 PM

CHmod?
 
Im having the same kinda issues.. I completed every step until the chmod part. I open the console but was lost at that point. what do the command look like.

i.e chmod sharedfolder 2770?



:newbie:

oneiltj 08-08-2004 08:11 PM

Been away...
 
sidmark-2850 - Sorry for such a long time in my reply. I've been away from the group for a while.

A number of things came up since this thread was posted limiting my abilllity to work on this.

Thank you all for your help.

--t


All times are GMT -5. The time now is 05:45 PM.