Red Hat Bugzilla – Bug 194364
Autofs cannot mount nfs exports with escaped whitespaces
Last modified: 2007-11-30 17:07:25 EST
+++ This bug was initially created as a clone of Bug #192939 +++
Description of problem:
Entries in an automount table that contain whitespaces escaped by a backslash
are not properly passed through to the mount command.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create an NFS export that contains a whitespace on a nfs server
(for example "/export/share/dir with whitespace")
2. Create an automount table that mounts this export with whitespaces escaped
out by a backslash. Example entry
dir\ with\ whitespace fileserver:/export/share/dir\ with\ whitespace
3. Add this automount table to to /etc/master.
4. Restart autofs
5. Change directory to the auto mounted filesystem
When you change directory to the auto mounted file system you get the message
"cd: dir with whitespace: No such file or directory"
And the following entry is created in the syslog
May 24 16:44:51 pc100575 automount: >> mount: fileserver:/export/share/dir
failed, reason given by server: Permission denied
May 24 16:44:51 pc100575 automount: mount(nfs): nfs: mount failure
fileserver:/export/share/dir on /test/dir with whitespace
May 24 16:44:51 pc100575 automount: failed to mount /test/dir with whitespace
The mount should have been successful.
The problem has also been reproduced with autofs 4.1.4
It is possible to mount an nfs exported file system with whitespaces in it on
Linux. The whitespace character is not a reserved character for nfs exported
We also use Sun Solaris which has no problems with escaped whitespace in
automount tables. We want to use the same NFS exports and mountpoints on Linux
as we do on Solaris.
-- Additional comment from firstname.lastname@example.org on 2006-06-06 13:58 EST --
Yes, this is a known problem. I'll look into it.
-- Additional comment from email@example.com on 2006-06-06 14:19 EST --
Actually, I just tried this and it worked. Could you post your maps, please?
Be sure it's the exact maps you are using when experiencing the problem.
-- Additional comment from Joris.van.Steen@asml.com on 2006-06-07 03:20 EST --
Created an attachment (id=130659)
Section of messages file
The messages in the log file that are created by autofs.
The permission denied in the "reason for failure" messages is generated by our
file server when it get a request for a non existant directory. The file server
is a network appliance filer running data ontap 7.0.4p4. With support for nfs
-- Additional comment from Joris.van.Steen@asml.com on 2006-06-07 03:24 EST --
Created an attachment (id=130660)
This is the automount table I used for testing.
It is possible to mount the nfs export "nlvdhs99:/vol/share01/vfm/test\ dir"
manually with the following mount command.
mount nlvdhs99:/vol/share01/vfm/test\ dir /mnt
-- Additional comment from firstname.lastname@example.org on 2006-06-07 09:19 EST --
OK, I have been able to reproduce this. Thanks!
-- Additional comment from email@example.com on 2006-06-07 11:10 EST --
Created an attachment (id=130684)
Fix the mounting of directories with spaces
This patch fixes the problem in my environment. Could you please test it out?
If you would like me to build a package for you, please let me know which
architecture you are interested in.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
A fix for this was built into autofs-4.1.3-190. Test packages are available for
this and later version on my people page, in the following directory:
Please test the latest package version available there.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.