Issue #14066 has been reported by Adam Heinz.
----------------------------------------
Feature #14066: unexpected file permissions using links => follow without
explicit mode
https://projects.puppetlabs.com/issues/14066
Author: Adam Heinz
Status: Unreviewed
Priority: Low
Assignee:
Category: file
Target version:
Affected Puppet version: 2.6.13
Keywords:
Branch:
**TLDR:** With links => follow set and mode unset, I expected file permissions
to match those of the linked file, not the link itself.
In order to reproduce production bugs on a test environment, I use puppet to
copy
the latest backup to a test server, followed by the remainder of the
puppet-driven configuration necessary. I just started using symlinks,
so I added links => follow to the file type.
File {
group => root,
owner => root,
}
file { "/var/lib/mysql/backups/current.sql.gz":
backup => false,
links => follow,
source => "puppet:///files/backups/current.sql.gz",
}
When I kicked puppet on the test machine, it set the file permissions
to the permissions of the link itself, not the file the link pointed
to.
Apr 17 10:55:37 test1 puppet-agent[1807]:
(/Stage[main]/Testserver/File[/var/lib/mysql/backups/current.sql.gz]/mode)
mode changed '644' to '777'
puppetmaster # ls -l /var/lib/mysql/backups
-rw-r--r-- 1 root root 4330512 Apr 17 00:22 2012-04-17.sql.gz
lrwxrwxrwx 1 root root 14 Apr 17 10:45 current.sql.gz ->
2012-04-17.sql.gz
Previously, I did something more along the lines of
file { "/var/lib/mysql/backups/current.sql.gz":
backup => false,
source => "puppet:///files/backups/2012-04-17.sql.gz",
}
which resulted in the expected 644 permissions.
--
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.