FTP virtual directory, help!!!!!!!!!!! [Answered]RSS

8 replies

Last post Nov 04, 2009 08:51 PM by qbernard

  • FTP virtual directory, help!!!!!!!!!!!

    Nov 03, 2009 06:13 AM|Vloors|LINK

    I am trying to create an FTP virtual directory, but some having some issues. so far I have:

     

    New-Item IIS:\Sites\SFTP\$folder -type VirtualDirectory -physicalPath d:\temp\$folder

    However, how do I set the other properties, like’ FTP Authorization Rules’?

    The $folder variable is defined earlier in the script.

    I am using Windows 2008 R2 with FTP 7.5

    Any help would be appreciated.

    iis 7 PowerShell FTP

  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 03, 2009 06:15 AM|qbernard|LINK

    Cheers,
    Bernard Cheah
  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 03, 2009 06:19 AM|Vloors|LINK

    Thanks you very much, tried it and it works!!!!! ;)

  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 03, 2009 06:22 AM|qbernard|LINK

    Cool, thanks for the update.

    Cheers,
    Bernard Cheah
  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 03, 2009 08:51 AM|Vloors|LINK

    Vloors

    Thanks you very much, tried it and it works!!!!! ;)

     

     

    Spoke too soon. :'( Add-Webconfiguration works, in as much that it is adding the correct authorisation rules, but the original authorisation rules are still present. How would I remove them?  

     

    I tried using set-webconfiguration and clear-webconfiguration, but no luck...  
  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 04, 2009 02:19 AM|qbernard|LINK

    What happen with clear-webconfiguration? nothing?

    Cheers,
    Bernard Cheah
  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 04, 2009 10:17 AM|Vloors|LINK

    I can't seem to get the syntax right... oh the frustration  ;)

  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 04, 2009 12:15 PM|Vloors|LINK

    Currently my script reads:

      New-Item IIS:\Sites\SFTP\$folder -type VirtualDirectory -physicalPath d:\temp\$folder  

     

     

    Add-WebConfiguration "system.ftpserver/security/authorization" -Value @{accessType="Allow";users=$groupname;permissions=3} -Location SFTP/$folder -PSPath iis:\ 

    With $folder and $groupname being defined earlier

  • Re: FTP virtual directory, help!!!!!!!!!!!

    Nov 04, 2009 08:51 PM|qbernard|LINK

    Clear-Webconfiguration '/system.ftpServer/security/authorization'  -PSPath IIS:\ -location FTP/$folder

    Remove all entries except the default one :)  so you need to remove at the ftp root first. then add in those you need later.

    Cheers,
    Bernard Cheah