CreateTextFile in secure FTP folder

Discussion in 'ASP General' started by Jennifer, Aug 19, 2008.

  1. Jennifer

    Jennifer Guest

    Hello

    I get permission denied at line 4 in the following ASP Script
    <%
    dim fs,f
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set f=fs.CreateTextFile("test.txt",true)
    response.write "here"
    f.write("Hello World!")
    f.write("How are you today?")
    f.close
    set f=nothing
    set fs=nothing
    %>

    I have write permission on the folder, but the folder is also secured for
    FTP. Should I somehow pass FTP permissions in this script?

    Kind Regards

    Jennifer
     
    Jennifer, Aug 19, 2008
    #1
    1. Advertising

  2. Jennifer

    Old Pedant Guest

    "Jennifer" wrote:

    > I have write permission on the folder, but the folder is also secured for
    > FTP. Should I somehow pass FTP permissions in this script?


    It's not relevant whether _you_ have permisson on the folder. The question
    is whether IIS has permissions. ASP runs under the aegis of the IIS "user",
    which is named "IUSR_xxx" where "xxx" is the name of the machine where IIS is
    running.

    *THAT* is the user that must have full persmissions on the folder.
     
    Old Pedant, Aug 20, 2008
    #2
    1. Advertising

  3. Jennifer

    Jennifer Guest

    Thank you Old Pedant

    "Old Pedant" wrote:

    > "Jennifer" wrote:
    >
    > > I have write permission on the folder, but the folder is also secured for
    > > FTP. Should I somehow pass FTP permissions in this script?

    >
    > It's not relevant whether _you_ have permisson on the folder. The question
    > is whether IIS has permissions. ASP runs under the aegis of the IIS "user",
    > which is named "IUSR_xxx" where "xxx" is the name of the machine where IIS is
    > running.
    >
    > *THAT* is the user that must have full persmissions on the folder.
    >
    >
     
    Jennifer, Aug 20, 2008
    #3
  4. Jennifer

    francis Guest

    Hi,

    I noticed that if use

    set f=fs.CreateTextFile("c:\test.txt",true)

    intead of

    set f=fs.CreateTextFile("test.txt",true)

    the program runs fine. Is the problem still connected with IUSR_xxx?

    Thanks


    "Old Pedant" wrote:

    > "Jennifer" wrote:
    >
    > > I have write permission on the folder, but the folder is also secured for
    > > FTP. Should I somehow pass FTP permissions in this script?

    >
    > It's not relevant whether _you_ have permisson on the folder. The question
    > is whether IIS has permissions. ASP runs under the aegis of the IIS "user",
    > which is named "IUSR_xxx" where "xxx" is the name of the machine where IIS is
    > running.
    >
    > *THAT* is the user that must have full persmissions on the folder.
    >
    >
     
    francis, Sep 19, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. spradl

    FileSystemObject.CreateTextFile Problem

    spradl, Aug 12, 2003, in forum: ASP General
    Replies:
    9
    Views:
    194
    Ray at
    Aug 14, 2003
  2. eddie wang

    filesys.createTextFile limit

    eddie wang, Dec 11, 2003, in forum: ASP General
    Replies:
    3
    Views:
    184
    Aaron Bertrand - MVP
    Dec 11, 2003
  3. Anchorman

    CreateTextFile hangs

    Anchorman, Jan 7, 2004, in forum: ASP General
    Replies:
    1
    Views:
    126
    Ray at
    Jan 7, 2004
  4. Séverine Donnay

    CreateTextFile deny on IIS

    Séverine Donnay, Jan 8, 2005, in forum: ASP General
    Replies:
    14
    Views:
    244
    Séverine Donnay
    Jan 9, 2005
  5. D. Buck
    Replies:
    2
    Views:
    566
    D. Buck
    Jun 29, 2004
Loading...

Share This Page