Warning when exported path contains spaces

Bug #197499 reported by Chad Miller on 2008-03-02
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Low
Unassigned

Bug Description

root@zippy:~ # mkdir /tmp/x /tmp/"x withspace"
root@zippy:~ # cat >/etc/exports
"/tmp/x" 0.0.0.0/0.0.0.0(async,no_subtree_check)
"/tmp/x withspace" 0.0.0.0/0.0.0.0(async,no_subtree_check)
root@zippy:~ # exportfs -ar
exportfs: Warning: /tmp/x withspace does not support NFS export.
root@zippy:~ # ls -lad /tmp/x*
drwxr-xr-x 2 root root 1024 2008-03-01 19:53 /tmp/x
drwxr-xr-x 2 root root 1024 2008-03-01 19:53 /tmp/x withspace
root@zippy:~ # dpkg -l nfs-common nfs-kernel-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================-=================-==================================================
ii nfs-common 1:1.1.1~git-20070 NFS support files common to client and server
ii nfs-kernel-server 1:1.1.1~git-20070 support for NFS kernel server
root@zippy:~ # man exports |grep -C 1 spaces
       the end of the line. Entries may be continued across newlines using a
       backslash. If an export name contains spaces it should be quoted using
       double quotes. You can also specify spaces or other unusual character
       in the export name using a backslash followed by the character code as
root@zippy:~ #

Chad Miller (cmiller) wrote :

Additionally, backslash-space and backslash-040 give the same error message when used in place of spaces, with or without quotes.

The Punisher (melprinsi) wrote :

same here

taka k. (scar) wrote :

confirmed here with ubuntu 8.10 and nfs-kernel-server 1:1.1.2-4ubuntu1.1 and nfs-common 1:1.1.2-4ubuntu1.1

tried using an export point with a space, defined inside quotes or with backslash-040

both exportfs and nfs-kernel-server return "Warning: <export point> does not support NFS export."

when the export point is renamed to not contain a space, and /etc/exports is updated accordingly, the export point is exported successfully

actually, chad succinctly summed it up in the original report ;)

silvagroup (casaba7339-ubuntu) wrote :

Confirmed here also with Ubuntu 8.10 same as scar. Unfortunately I can't change to no space in this case !!!!!!

Steve Langasek (vorlon) wrote :

In spite of the error message, a test here shows that when using the double-quote syntax, paths containing spaces can be successfully exported and mounted over NFS. So the only bug is a spurious (or not-so-spurious, if this violates the protocol) warning message from exportfs.

Changed in nfs-utils (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Steve Langasek (vorlon) on 2009-10-03
summary: - Exported filesystems do not allow spaces
+ Warning when exported path contains spaces

Steve Langasek's result is confirmed.

In /etc/exports on the NFS server, I used double quotes to enclose a path with a space. When I ran "exportfs -ra", I got the error, "Warning: <export point> does not support NFS export."

Then on the NFS client, I created an /etc/fstab entry where I replaced the space character " " with "\040". It works as expected (and no error is printed out).

Incidentally, finding out how to use double-quotes in /etc/exports was hard. Several forums exist where people falsely state 'spaces don't work at all with NFS'. And finding out to use \040 in /etc/fstab was hard too... I only decided to try that after somebody posted how to do that with a non-NFS mount point.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers