Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-109654

NFS exports (re)created with unescaped spaces from dataset

    XMLWordPrintable

    Details

    • Impact:
      Medium

      Description

      1. Created dataset VM Offline Datastore
      2. Created NFS share of dataset
      3. Web UI shows NFS share
      4. Error for syntax of /etc/exports is logged
      Mar  2 14:47:03 va-lor-tn-ut-01 1 2021-03-02T14:47:03.934638-05:00 va-lor-tn-ut-01.mteqdom.mteq.com mountd 3785 - - bad exports list line '/mnt/Atlantic/VM': symbolic link in export path or statfs failed
      Mar  2 14:47:04 va-lor-tn-ut-01 1 2021-03-02T14:47:04.235525-05:00 va-lor-tn-ut-01.mteqdom.mteq.com mountd 3785 - - bad exports list line '/mnt/Atlantic/VM': symbolic link in export path or statfs failed
      

       

      The line added to /etc/exports shows that the spaces are not escaped (with \040).

      root@va-lor-tn-ut-01[~]# sed -n '/VM/p' /etc/exports
      /mnt/Atlantic/VM Offline Datastore -maproot="root":"wheel" client1 client2 ...

      Manually fixed the exports entry and stop/started the NFS service from the Web UI.

      root@va-lor-tn-ut-01[~]# sed -i '' -e '/VM/s/ Offline /\\040Offline\\040/p' /etc/exports 
      root@va-lor-tn-ut-01[~]# sed -n '/VM/p' /etc/exports                            
      /mnt/Atlantic/VM\040Offline\040Datastore -maproot="root":"wheel"  client1 client2 ...

      Same error logged, likely because /etc/exports appears to be regenerated.

      Mar  2 17:10:58 va-lor-tn-ut-01 1 2021-03-02T17:10:58.344793-05:00 va-lor-tn-ut-01.mteqdom.mteq.com mountd 36219 - - bad exports list line '/mnt/Atlantic/VM': symbolic link in export path or statfs failed
      
      root@va-lor-tn-ut-01[~]# sed -n '/VM/p' /etc/exports
      /mnt/Atlantic/VM Offline Datastore -maproot="root":"wheel" client1 client2 ...

        Attachments

          Attachments

            JEditor

              Activity

                People

                Assignee:
                vladimirv Vladimir Vinogradenko
                Reporter:
                AJCxZ0 Andrew J. Caines
                Watchers:
                Andrew J. Caines, Bug Clerk, Vladimir Vinogradenko
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: