Re: MGET command deletes files



The is the scenario when files are deleted incorrectly:

The have 2 folders - one on a source server, one on a destination server.
There is a file in both folders with the same name.

\\source\folder1\file.txt
\\destination\folder2\file.txt

I am running the "mget" command to copy all files from folder1 to folder2.
However, the permissions on the copy of file.txt in folder 2 are very
restrictive, (for example, only one user account has permissions on the file,
and they only have read access). The permissions on the file in folder1 are
everyone - full control.
When the "mget" command is run from a command line, you are prompted whether
to transfer file.txt. Typing "y" to confirm that you would like to transfer
the file returns an error of

Error opening local file File.
> File.txt:Permission denied

Which is what you would expect. However, file.txt in folder2 then gets
deleted.
The FTP IIS log indicated that the file has transferred successfully.

10:43:38 127.0.0.1 [13]sent /folder1/file.txt 226

Jo

"Bernard Cheah [MVP]" wrote:

> Not sure if I get you correctly. the file that can't be overwrite but get
> deleted when you try to get it ?
> not able download ? but delete ? doens't make sense, right ?
>
> what's the iis ftp status code in the log file.
>
> --
> Regards,
> Bernard Cheah
> http://www.microsoft.com/iis/
> http://www.iiswebcastseries.com/
> http://www.msmvps.com/bernard/
>
>
> "Jo Winchester" <JoWinchester@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:2F6225DA-F175-4CDE-9E52-D5BBFDA03695@xxxxxxxxxxxxxxxx
> >I am using the MGET command, and have been testing to see what happens if
> >you
> > try to transfer a file that has the same name as a file in the destination
> > folder, but the file in the destination folder has permissions set so that
> > it
> > can't be overwritten.
> > Running from a command prompt, if I run mget *.* I am prompted y/n to
> > transfer the file, then get a "permission denied" message (which is what
> > I'd
> > expect) but the file that cannot be overwritten is then deleted. I am
> > going
> > to be automating the FTP xfer, and am concerned that files may be deleted
> > unexpectedly
>
>
>
.



Relevant Pages

  • RE: Moving Windows stuff from C to D on a partitioned drive.
    ... when copying folders/files, the folders/files inherit ... destination directories have the same permissions. ... which inherits permissions from the destination folder. ...
    (microsoft.public.windowsxp.general)
  • Re: BTS 2006 FTP Adapter spooling permissions
    ... Did you say you have 2 FTP send port pointing to the same FTP location? ... folder, not to mention same output file. ... when move from"spooling folder to destination folder", ... TemporaryFolder: destfolder/tmp ...
    (microsoft.public.biztalk.general)
  • File compare script running slowly.
    ... ' This procedure replicates between the source and the destination ... ' directories at the folder level. ... Dim aFolderArraySource ...
    (microsoft.public.scripting.vbscript)
  • Re: Moving Directories
    ... Robert Pollock wrote: ... object.MoveFolder (source, destination); ... The path where the folder or folders are to be moved. ... destination argument can't contain wildcard characters. ...
    (microsoft.public.excel.programming)
  • Re: Moving a file from A to B fails with incorrect syntax error
    ... folder with the same attributes and permissions will move to the same ... destination folders. ... Try running a sample from a simple console app. ... but the error message i get is ...
    (microsoft.public.vc.mfc)