« Previous Next »

Thread: FTP virtual directory, help!!!!!!!!!!!

Last post 11-04-2009 8:51 PM by qbernard. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 11-03-2009, 6:13 AM

    • Vloors
    • Not Ranked
    • Joined on 11-03-2009, 11:06 AM
    • London
    • Posts 5

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

    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.

  • 11-03-2009, 6:15 AM In reply to

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

  • 11-03-2009, 6:19 AM In reply to

    • Vloors
    • Not Ranked
    • Joined on 11-03-2009, 11:06 AM
    • London
    • Posts 5

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

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

  • 11-03-2009, 6:22 AM In reply to

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

    Cool, thanks for the update.

    Cheers,
    Bernard Cheah
  • 11-03-2009, 8:51 AM In reply to

    • Vloors
    • Not Ranked
    • Joined on 11-03-2009, 11:06 AM
    • London
    • Posts 5

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

    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...  
  • 11-04-2009, 2:19 AM In reply to

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

    What happen with clear-webconfiguration? nothing?

    Cheers,
    Bernard Cheah
  • 11-04-2009, 10:17 AM In reply to

    • Vloors
    • Not Ranked
    • Joined on 11-03-2009, 11:06 AM
    • London
    • Posts 5

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

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

  • 11-04-2009, 12:15 PM In reply to

    • Vloors
    • Not Ranked
    • Joined on 11-03-2009, 11:06 AM
    • London
    • Posts 5

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

    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

  • 11-04-2009, 8:51 PM In reply to

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

    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
Page 1 of 1 (9 items)
Microsoft Communities