Gene6 FTP Server Forum: Script behavior changes in 3.5 - Gene6 FTP Server Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Script behavior changes in 3.5 Rate Topic: -----

#1 User is offline   pjolin 

  • Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 24-September 04

Posted 07 June 2005 - 05:50 PM

I had the following script running to handle file uploads under version 3.4:

CODE
function OnFileUploaded ()
{
    try
    {
 var fs = new ActiveXObject("Scripting.FileSystemObject");
 fs.CreateFolder("D:\\TempDirName");
 fs.MoveFile(Client.FilenameReal, "D:\\TempDirName\\TempFileName");
    }
    catch (e)
    {
 Client.Send(214, "EXCEPTION: " + e.name + ": " + e.message + ": " + e.number + ": " + e.description);
    }
}


This is an oversimplified version of the code, but basically I'm receiving files that are to be moved elsewhere to be processed by a custom application. This worked well under 3.4.

I upgraded to 3.5 this morning, and now when I upload a file, I get an exception on "fs.MoveFile":

QUOTE
214 EXCEPTION: Error: Permission denied: -2146828218: Permission denied


The FTP server is running under the same account as before, and the account has full controls on both the directory where the file was uploaded and the directory where the file is to be copied.

I explored a bit, and if I replace the "fs.MoveFile" command with this:

CODE
fs.CopyFile(Client.FilenameReal, filePath);
fs.DeleteFile(Client.FilenameReal);


Then the copy occurs, but the delete fails with the same exception as before.

I've been checking and double-checking all permissions-related settings, even configured the service to run under the local administrators group, to no avail.

Was something changed in the server?
At this point I'm thinking it might be that the server now keeps the uploaded file locked until the scripts have finished running, therefore I can't move or delete it?

Thank you,

Pascal
0

#2 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 07 June 2005 - 05:51 PM

This bug has been fixed for the next release.

Do you want to test with the latest beta ?

This post has been edited by CodSpirit: 07 June 2005 - 05:54 PM

If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#3 User is offline   pjolin 

  • Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 24-September 04

Posted 07 June 2005 - 05:54 PM

QUOTE (CodSpirit @ Jun 7 2005, 05:51 PM)
This bug has been fixed for the next release as far as I know.

Do you want to test with the latest beta ?


If it is reasonably stable, I would love to, since as it stands now I'll have to either manually remove files several times a day, or re-educate 50-ish users, some of whom would have to alter automated upload scripts.

Pascal
0

#4 User is offline   Matthieu 

  • Addicted Member
  • Group: Staff
  • Posts: 1964
  • Joined: 22-October 03
  • Gender:Male
  • Location:France : Mouy
  • Interests:Science-fiction, World news

Posted 07 June 2005 - 06:01 PM

Hello Pascal,

contact us at support at g6ftpserver.com if you want to test that everything is ok with the latest build.
Gene6, SARL
Do not use PM to ask for support, use the forum or support email.

Special offer : 10% discount with coupon code : DISCOUNT
0

#5 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 07 June 2005 - 06:04 PM

Was sure M.Roger will suggest that laugh.gif
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#6 User is offline   Matthieu 

  • Addicted Member
  • Group: Staff
  • Posts: 1964
  • Joined: 22-October 03
  • Gender:Male
  • Location:France : Mouy
  • Interests:Science-fiction, World news

Posted 07 June 2005 - 06:25 PM

Sent to Pascal via the support smile.gif
Gene6, SARL
Do not use PM to ask for support, use the forum or support email.

Special offer : 10% discount with coupon code : DISCOUNT
0

#7 User is offline   pjolin 

  • Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 24-September 04

Posted 07 June 2005 - 06:33 PM

QUOTE (M.Roger @ Jun 7 2005, 06:25 PM)
Sent to Pascal via the support smile.gif


Received, installed, tested, working!

Thanks a million, you guys are fast as hell as usual!
0

#8 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 07 June 2005 - 06:37 PM

That's good news biggrin.gif
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#9 User is offline   jpark 

  • New Member
  • Group: Registered Users
  • Posts: 1
  • Joined: 13-June 08

Posted 07 August 2008 - 03:15 PM

QUOTE (CodSpirit @ Jun 7 2005, 07:37 PM) <{POST_SNAPBACK}>
That's good news biggrin.gif


I am using 3.6 and having exactly same issue. Is there any fix?

Thank you.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users