Jump to content

NFS and Samba Madness


Yuyo
 Share

Recommended Posts

Hi Guys,

 

I just finished setting up a Mandrake 9.1 file server. Everything went great and I am using samba to share files both with the rest of my Linux machines and the one lonely windows box. So far so good, but for some reason, Samba does not appear to like the ñ or any accented character that are common in the Spanish language. The files that have these characters have a lock on them when mounted and can only be accessed from the windows box, but not from any of the Linux boxes.

 

I find this perplexing, since I would presume that two boxes using the same version of samba would understand each other better than a Samba server and a Windows box.

 

Anybody has any pointers how to correct this naming issue?

 

In the meantime, I decided that the weird file naming surely must have

something to do with the fact that CIFS is a microsoft protocol that is not fully documented. So NFS here I come!

 

I create my /etc/exports as such:

 

/home/network 192.168.1.3(rw)

 

And for added security specify the following in /etc/hosts.allow:

 

portmap: 192.168.1.2 , 192.168.1.3, 192.168.1.100

lockd: 192.168.1.2 , 192.168.1.3 , 192.168.1.100

rquotad: 192.168.1.2 , 192.168.1.3 , 192.168.1.100

mountd: 192.168.1.2 , 192.168.1.3 , 192.168.1.100

statd: 192.168.1.2 , 192.168.1.3 , 192.168.1.100

 

and /etc/hosts.deny:

 

portmap:ALL

lockd:ALL

mountd:ALL

rquotad:ALL

statd:ALL

 

So far everything is going honky dory, all of my daemons are running, so I proceed to mount the share. And it mounts, BUT. Here's the big BUT.

 

1) The naming issue that manifested itself between samba server and samba clients also appears between the NFS server and NFS clients, with the Samba server and Windows 2000 as the only combination to get it right.

 

2) The mounted share /home/network has three subdirectories /backup

/Documents /Music but I can only write to /Documents but not to any of its subdirectories and I can only do so some of the time.

 

Leaving the hosts.allow and hosts.deny files empty and doing "service nfs reload" and "service nfs restart" does not make any difference. I have read and re-read the NFS-How-To, Red Hat's and Mandrake's documentation on the subject, etc.

 

What incredibly obvious thing am I missing?

 

What in the world is going on?

 

If you have made it this far into my post, I humbly thank you.

 

 

Ps: I am looking forward to proper ACLs and some rational directory services in Linux. That's what the folks at Novell had promised to deliver and I hope they do as some of these things can be a bit trying. Granted, Samba's file sharing took me 2 minutes to set up and it works well with the exception of the naming issues. Thanks for your help.

Link to comment
Share on other sites

firstly congratualtions on choosing NFS....

I use it even when the share is SAMBA'd ...

 

For NFS: Are extended latin characters supported ??

For Samba the solution is I beleive something like filename mangling.

You can set it as a common or share specific option.

 

I think eventually you may find that you get problems.... sooner or later if you use regional charecters problems occur.

 

I'm afraid I don't know Spanish spelling rules. I know the french insist they can't spell a word without them BUT if its in UPPERCASE then they are entirely optional...... so obviously they can when they want??

 

As usual with Windows theirs a 'quick fix' but this comes at the expense of robustness.

I found this on NFS

9.  Internationalization

 

  NFS version 2 and 3 are currently limited in the character encoding

  of strings. In the NFS protocols, strings are used for file and

  directory names, and symbolic link contents. Although the XDR

  definition [RFC1832] limits strings in the NFS protocol to 7-bit US-

  ASCII, common usage is to encode filenames in 8-bit ISO-Latin-1.

  However, there is no mechanism available to tag XDR character strings

  to indicate the character encoding used by the client or server.

  Obviously this limits NFS' usefulness in an environment with clients

  that may operate with various character sets.

From http://www.faqs.org/rfcs/rfc2624.html

Link to comment
Share on other sites

firstly congratualtions on choosing NFS....

I use it even when the share is SAMBA'd ...  

 

For NFS:  Are extended latin characters supported ??  

For Samba the solution is I beleive something like filename mangling.  

You can set it as a common or share specific option.  

 

I think eventually you may find that you get problems.... sooner or later if you use regional charecters problems occur.  

 

I'm afraid I don't know Spanish spelling rules.  I know the french insist they can't spell a word without them BUT if its in UPPERCASE then they are entirely optional...... so obviously they can when they want??  

 

As usual with Windows theirs a 'quick fix' but this comes at the expense of robustness.  

I found this on NFS

9.  Internationalization

 

  NFS version 2 and 3 are currently limited in the character encoding

  of strings. In the NFS protocols, strings are used for file and

  directory names, and symbolic link contents. Although the XDR

  definition [RFC1832] limits strings in the NFS protocol to 7-bit US-

  ASCII, common usage is to encode filenames in 8-bit ISO-Latin-1.

  However, there is no mechanism available to tag XDR character strings

  to indicate the character encoding used by the client or server.

  Obviously this limits NFS' usefulness in an environment with clients

  that may operate with various character sets.

From http://www.faqs.org/rfcs/rfc2624.html

 

Ok, so I am not going crazy. I did read about the eight bit encoded of filenames, but I was under the impression that the latest versions of NFS actually supported it. What is a little puzzling is that I am sure NFS is being used to share files in Spanish speaking countries, so there has to be a work around. By the way, I can live without the accents on filenames perfectly fine, but the "ñ" is absolutely needed. Not to put a fine put on it, but the difference between "ano" and "año" (anus) and (year) is just that one mischievous letter.

 

Thanks for your help. I also found that there is an internationalization option for Samba where one can specify the character set. Unfortunately, this hasn't resolved the issues for me yet either.

 

Anybody else? Is there no resident Spaniard in the house?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...