Ask Your Question

How to serve files from custom mount point?

asked 2013-09-04 03:27:24 -0500

deric gravatar image

updated 2013-09-28 17:39:30 -0500

Serving files from puppet:///modules/{module_name} works for me, however when I try to get file from custom mount point it fails.


   path /etc/puppet/files
   allow *

   allow *

   path /etc/puppet/munin-plugins
   allow *


path /file
allow *

module code:

  $real_source = $source ? {
      ''      =>  "munin/plugins/${plugin_src}",
      default => $source

  file { "munin_plugin_${name}":
    path    => "${munin::plugin::scriptpaths::script_path}/${name}",
    source  => "puppet:///${mountpoint}/${real_source}",
    owner   => root,
    group   => 0,
    mode    => '0755';


  munin::plugin::deploy { 'redis_':
    source     => 'redis-munin/redis_memory_',
    mountpoint => 'munin-plugins'

full path to the file: /etc/puppet/munin-plugins/redis-munin/redis_memory_

I keep getting error 400:


  /Stage[main]//Node ...
edit retag flag offensive close merge delete


Are those the complete fileserver.conf and auth.conf files? If not, can you post the entire contents of each?

GregLarkin gravatar imageGregLarkin ( 2013-09-04 07:21:42 -0500 )edit

`auth.conf` is the default version, I guess. It's pretty long, so here's the link:

deric gravatar imagederic ( 2013-09-04 10:51:43 -0500 )edit

Please post the .pp file that uses the custom mountpoint, too.

GregLarkin gravatar imageGregLarkin ( 2013-09-04 20:18:47 -0500 )edit

I've updated the question

deric gravatar imagederic ( 2013-09-05 03:21:24 -0500 )edit

What is `real_source` in your module code? Is it different than the `source` parameter you are passing to your `munin::plugin::deploy` define?

Stefan gravatar imageStefan ( 2013-09-08 08:41:08 -0500 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2016-10-17 20:04:13 -0500

In case someone else stumbles here looking for the correct answer, add the following to your auth.conf:

path ~ ^/file_(metadata|content)s?/munin-plugins/
auth any
allow *
edit flag offensive delete link more

answered 2013-09-09 08:15:58 -0500

Simon gravatar image

Doe it work with "auth any"?

path ~ ^/file_(metadata|content)/munin-plugins/
auth any
allow *
edit flag offensive delete link more


No, it doesn't help. Is there a way how to print directories where is puppet searching for files? In case when path `puppet:///modules` is used I don't ...(more)

deric gravatar imagederic ( 2013-09-16 08:26:04 -0500 )edit

answered 2013-09-04 20:27:51 -0500

GregLarkin gravatar image

Please add this stanza before line 72 in your auth.conf and report back here if it works or not:

path ~ ^/file_(metadata|content)/munin-plugins/
allow *
edit flag offensive delete link more


still the same error: `Not authorized to call find on /file_metadata/munin-plugins/redis-munin/redis_memory_ with {:links=>"manage"}`

deric gravatar imagederic ( 2013-09-05 03:22:29 -0500 )edit

Just to be 100% sure, did you add those lines before the "path /file" line in the file?

GregLarkin gravatar imageGregLarkin ( 2013-09-05 14:39:50 -0500 )edit

Also, what version of Puppet are you using, and is it a fresh install or an upgrade from a previous version?

GregLarkin gravatar imageGregLarkin ( 2013-09-05 17:26:38 -0500 )edit

Yes, it was before "path /file". I have puppet 3.2.4, but it was upgraded from 2.7 I guess. Are the default auth.conf and fileserver.conf very ...(more)

deric gravatar imagederic ( 2013-09-06 15:56:57 -0500 )edit

answered 2013-09-04 10:25:19 -0500

Ancillas gravatar image

Make sure the permissions on /etc/puppet/munin-plugins, and its children, are set appropriately so that the user that Puppet runs as has access.

edit flag offensive delete link more


The permissions are the same as for all the modules. I don't think that should cause any troubles.

deric gravatar imagederic ( 2013-09-04 10:52:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-09-04 03:27:24 -0500

Seen: 918 times

Last updated: Oct 17 '16