X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e6d942db67fd560cb11df049bd355bbd664784f6..cdbed3e7ad8104a1b21bc88e446fd87465182638:/cookbooks/ftp/recipes/default.rb?ds=inline diff --git a/cookbooks/ftp/recipes/default.rb b/cookbooks/ftp/recipes/default.rb index 58fc9c80b..79e624ffa 100644 --- a/cookbooks/ftp/recipes/default.rb +++ b/cookbooks/ftp/recipes/default.rb @@ -17,7 +17,10 @@ # limitations under the License. # -package "vsftpd" +package %w[ + vsftpd + libpam-pwdfile +] template "/etc/vsftpd.conf" do source "vsftpd.conf.erb" @@ -26,17 +29,26 @@ template "/etc/vsftpd.conf" do mode 0o644 end +template "/etc/pam.d/vsftpd" do + source "pam-vsftpd.erb" + owner "root" + group "root" + mode 0o644 +end + service "vsftpd" do - action [:enable] # Do not start the service as config may be broken from failed chef run + action [:enable, :start] supports :status => true, :restart => true, :reload => true subscribes :restart, "template[/etc/vsftpd.conf]" + subscribes :restart, "template[/etc/pam.d/vsftpd]" end firewall_rule "accept-ftp-tcp" do - action :helper + action :accept source "net" dest "fw" proto "tcp" dest_ports "ftp" source_ports "-" + helper "ftp" end