Issue #22349 has been updated by Melissa Stone.

Status changed from Merged - Pending Release to Closed

Release in Facter 1.7.4-rc1

----------------------------------------
Bug #22349: Facter fails to run as a non-root user when /etc/facter/facts.d is 
not readable
https://projects.puppetlabs.com/issues/22349#change-101221

* Author: Andrew Parker
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 1.7.4
* Keywords: 
* Branch: https://github.com/puppetlabs/facter/pull/531
* Affected Facter version: 1.7.0
----------------------------------------
If the `/etc/facter/facts.d` directory is available, but not readable, then 
facter, when run as a non-root user will still try to read from it and fail.

<pre>
[vagrant@localhost ~]$ ls -l /etc/facter
total 4 
drwxr-x--- 2 root root 4096 Aug 29 19:25 facts.d
[vagrant@localhost ~]$ facter
Error: Permission denied - /etc/facter/facts.d
</pre>

If that directory is made readable, then facter will work.

<pre>
[vagrant@localhost ~]$ sudo chmod o+r /etc/facter/facts.d
[vagrant@localhost ~]$ ls -l /etc/facter
total 4
drwxr-xr-- 2 root root 4096 Aug 29 19:25 facts.d
[vagrant@localhost ~]$ facter
architecture => x86_64
augeasversion => 0.9.0
</pre>

As of Puppet 3.0.0, puppet will now look in ~/.puppet for its configuration 
information (#16637); however, facter, when it got external facts (#2157) and 
suddenly had the ability to read from a specific directory, did not take into 
account what user it was running as. This causes the problem above, which 
prevents facter from running for a non-root user, but also stops puppet from 
running as non-root.

Facter needs to follow puppet's lead and use a user-local directory when it 
isn't running as root.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to