Skip to content

Instantly share code, notes, and snippets.

@ptinsley
Created April 9, 2013 18:35
Show Gist options
  • Save ptinsley/5348192 to your computer and use it in GitHub Desktop.
Save ptinsley/5348192 to your computer and use it in GitHub Desktop.
Puppet grant ftp access to user in IIS
exec { "Grant FTP Access to ${username}": # Grant access to our user
command => "C:\Windows\System32\inetsrv\appcmd.exe set config \"${site_name}\" /section:system.ftpServer/security/authorization /+\"[accessType='Allow',users='${username}',permissions='Read, Write']\" /commit:apphost",
unless => "cmd.exe /c C:\Windows\System32\inetsrv\appcmd.exe list config \"${site_name}\" /section:system.ftpServer/security/authorization | find \"${username}\"",
path => $::path,
require => [ User[$username], Iis_vdir["${site_name}/"] ],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment