Created
April 9, 2013 18:35
-
-
Save ptinsley/5348192 to your computer and use it in GitHub Desktop.
Puppet grant ftp access to user in IIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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