luci-app-statistics: add advice about data directory permissions
authorHannu Nyman <hannu.nyman@iki.fi>
Mon, 23 Jan 2017 17:31:40 +0000 (19:31 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Mon, 23 Jan 2017 17:31:40 +0000 (19:31 +0200)
Add advice about the permissions needed for the data directory:

  Pages are rendered as user 'nobody', so the *.rrd files,
  data directory and all its parent directories need to be
  world readable.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua

index f31fb20..fa00bbb 100644 (file)
@@ -19,7 +19,12 @@ enable = s:option( Flag, "enable", translate("Enable this plugin") )
 enable.default = 1
 
 -- collectd_rrdtool.datadir (DataDir)
 enable.default = 1
 
 -- collectd_rrdtool.datadir (DataDir)
-datadir = s:option( Value, "DataDir", translate("Storage directory") )
+datadir = s:option( Value, "DataDir",
+       translate("Storage directory"),
+       translate("Note: as pages are rendered by user 'nobody', the *.rrd files, " ..
+                 "the storage directory and all its parent directories need " ..
+                 "to be world readable."
+       ))
 datadir.default  = "/tmp"
 datadir.rmempty  = true
 datadir.optional = true
 datadir.default  = "/tmp"
 datadir.rmempty  = true
 datadir.optional = true