1828371 Members
2989 Online
109976 Solutions
New Discussion

NFS & then Samba

 
Ivan Senekovic_1
Occasional Advisor

NFS & then Samba

Help needed on sharing export from VMS to Linux .
I set up an export on VMS towards Linux box.
I mount it there and it works OK.
Then I share this mount point on linux via Samba to win network users.
It is still work if I,m a root user.
But if I,m ordinary user, I see share but no access permisons to enter it.
Samba share has 777 on dir permisions, trough samba I give all permissons to that share to all users, but still no access.
Any idea anybody ??

thanks and regards from Slovenia
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: NFS & then Samba

Shalom Ivan,

Welcome to the wonderful world of the Red Hat Samba bug.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=772038

The solution in my case Linux to Linux was to use NFS for that. HP-UX to Linux worked fine. HP-UX to HP-UX worked fine.

Only problem is Linux to Linux, though your case may show further issues.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Senekovic_1
Occasional Advisor

Re: NFS & then Samba

Thanks SEP for answer.
I think that my problem lies in inherited permisions on mount, which is performed by root.
If root is the user for mount, ordinary Linux user does not have permissions even to see that mount point. So consequential also Samba users.
So how to mount NFS structure from anywhere to Linux box, that I can see it as ordinary linux user ?

Thanks again.
Steven E. Protter
Exalted Contributor

Re: NFS & then Samba

Basically Ivan my situation is thus:

RH ES 4 Update 1 patched to Update 2.

The problem has persisted since ES 3 Update 1.

The back end server runs ES 4 Update 2 and has everything shared with both Samba and NFS.

The NFS is standard with limits on what hosts are permitted to mount.

Samba has no such restrictions.

Users exist on all systems with the same numeric user id.

It does seem to be a function of the root mounting Samba. The same share CAN be mounted by Windows or HP-UX samba/cifs client admistrative/root user with permissions preserved.

Even when permissions are okay and the folder containing the files has 777 permissions the user that owns the folder can create new files if logged directly onto the NFS/Samba server and can not when logged onto the application server with a Samba mount(done by root).

A possible solution is that each user does the mount in its .profile.

The security issue at hand is that you then have to store a samba password in a script readable form. This is a serious but not insurmountable script hazard.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Thorsteinson
Honored Contributor

Re: NFS & then Samba

NFS usually restricts access by root
by swiching the accessing user to nobody.

You can try turning of root squashing on the
NFS share. Or you can mount is a a non-root
user and use force user on the samba share
to access this share as that user.

Use the first option if you need to track
who created files. This will require
UIDs for you users on both systems. These
should be identical per user.

The second option is simpler to configure
and may be more secure. However, you loose
the UID tracking of the file creators.
Ivan Senekovic_1
Occasional Advisor

Re: NFS & then Samba

Thanks for suggestions.
At the end we controle user access to samba shares trough LDAP on same Linux box where I want to share NFS from VMS system.
So mounting NFS from VMS to directly win users is not possible & not allowed.
SEP unfortunatly we dont have RH but SUSE SLES9.
Now we go through second alternative with oracle, beacuse we have need for transfer some files directly from win clients to VMS/oracle server database.
Thanks again for help

regards

Ivan
Alan_152
Honored Contributor

Re: NFS & then Samba

I'd forget about Samba and use the windows NFS client that comes with the various Unix Services for Windows cds....
Indrajit_1
Valued Contributor

Re: NFS & then Samba

Hi,

In samba there r two types of permission..

1. user
2. share

Edit smb.conf file, and chage it to share.

This should resolve ur issue..

cheers
indrajit
Never Ever Give Up
Ivan Ferreira
Honored Contributor

Re: NFS & then Samba

You said that root can create the files, and also you have set 777 on the directories, that means that security is not your primary worry. What if you set force user and force group to root?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?