Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Slashes in file names Message-ID: <5828@auspex.auspex.com> Date: 8 Feb 91 19:08:18 GMT References: <25881@adm.brl.mil> Organization: Auspex Systems, Santa Clara Lines: 56 >I am fairly sure that the NFS spec does not contain any limitations >on the file names, therefore a slash is allowed. Yup. It also allows backslashes, which will, I suspect really piss off a DOS NFS server (yes, they exist) or an OS/2 NFS server. It also allows colons, which might piss off a Mac NFS server. Etc., etc., etc.. >Given that, it seems that any system that is sold as a file server should >have the utilities (other than just "dd") to handle the >system administration of these files. Either that, or not let you create them; that's what Suns have done since SunOS 4.1, what Auspex boxes have done since whatever release I put that fix in (I think it may have been in our first release), or what some other UNIX-based NFS servers probably do as well. Many boxes sold as file servers aren't sold *ONLY* as file servers, and you may want to have files shared between machines with different OSes, not all of which can cope with the same sorts of file names. >I would like to hear suggestions for changes to the NFS spec. >to solve this problem, since I can't think up any that work in >the long run. At one point, the NFS version 3 protocol spec included a request the response to which enumerated which characters the server could *not* cope with in file names. If it had some other characters unlikely to appear in file names, the client could then, when sending file names to the server, use those characters in some way to replace the characters the server can't cope with, and UNdo that operation when *reading* file names from the server (e.g. in the "read directory" request). >Just to forestall some discussion: Sorry, it won't work. >1. Telling the Gatorbox to not allow slashes doesn't work. I >see too many files with names like "Expense Report 12/14/90". Yes, it'd be unfortunate to tell users "sorry, you can't use file names like that", but you may simply be stuck. Life isn't always fair.... >2. Translating the slash just moves the problem to another >character. Nope. If the Mac can't cope with colons in file names (I think it's the pathname separator on Macs, and a "Macintosh System Software User's Guide, Version 6.0" here indicates that you can't use a colon in a file name), if it replaces slashes in file names with colons (which UNIX can deal with quite nicely) when it sends the names to a UNIX server, and replaces colons with slashes when it gets names from a UNIX server, the user on the Mac doesn't see any problem unless they try to tell a user on some other system "please take a look at my file 'Expense Report 12/14/90'". In that case, one or more of the users would have to be aware that the name on their system might be 'Expense Report 12:14:90'".