On Tue, 12 Mar 2002, David Fitch wrote:

> On Mon, Mar 11, 2002 at 09:32:51PM +1100, Jeff Waugh wrote:
> > <quote who="David Fitch">
> > > I have a directory shared/exported by samba and mounted on another (linux)
> > > machine.  The problem is when mounted on the second machine all the files
> > > and dirs in there are owned by root:root and rwxr-xr-x.  This is despite
> > > me mounting it by specifying a username and entering my passwd.  This
> > > means of course I can't write to anything under there unless I'm root.  An
> > > M$ machine can write to it ok.  So what can I set in the smb.conf file to
> > > fix it?  (it's not apparent to me from scanning the doco in
> > > /usr/doc/samba-doc.)
> > 
> > You want to add the uid and gid parameters to your mount command on the
> > client machine.
> 
> ta that works!  it makes everything under there that uid/gid though, which
> is better than root, but not what they really are.  So does that mean to 
> preserve the real ownerships of files/dirs I need one of the distributed 
> username schemes like nis?

The problem here is you're using the SMB/CIFS protocol and that's the weak
link that doesen't impliment user/group ID's. SMB is good for *USERS*
accessing a filesystem, not *MACHINES*. Use NFS if between two unix
servers for this sort of file access. Really, it's just a matter of on the
server end, editing /etc/exports, ensuring you're in the /etc/hosts file,
installing/starting the nfs service. Then on the client end add to 
/etc/fstab
or manually (as root) do mount -t nfs hostname:/path /mnt/something

If you must use SMB, then each user is going to have to mount the remote 
filesystem when they need it and unmount it when they're finished. Unless 
you do some sort of funny business with autofs such that it can 
concurrently be mounted in different places by simultaneous multiple users 
but that it something rather scary.

-- 
---<GRiP>--- 
Web: www.arcadia.au.com/gripz 
Answering Machine/fax: 02 4950 1194 (wait 5 mins if no answer)
Mobile: 0408 686 201

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to