The remote server returned an error 550 file unavailable

Устраняет проблему, при которой служба FTP возвращает сообщение об ошибке при попытке загрузить файл. Эта проблема возникает в Windows 8.1, Windows Server 2012 R2, Windows 7 с пакетом обновления 1 или Windows Server 2008 R2 с пакетом обновления 1.

Windows Server 2012 R2 Datacenter Windows Server 2012 R2 Standard Windows Server 2012 R2 Essentials Windows Server 2012 R2 Foundation Windows 8.1 Enterprise Windows 8.1 Pro Windows 8.1 Windows Server 2012 Datacenter Windows Server 2012 Datacenter Windows Server 2012 Standard Windows Server 2012 Standard Windows Server 2012 Essentials Windows Server 2012 Foundation Windows Server 2012 Foundation Windows 8 Enterprise Windows 8 Pro Windows 8 Windows Server 2008 R2 Service Pack 1 Windows Server 2008 R2 Datacenter Windows Server 2008 R2 Enterprise Windows Server 2008 R2 Standard Windows Server 2008 R2 Foundation Windows Server 2008 R2 for Itanium-Based Systems Windows 7 Service Pack 1 Windows 7 Ultimate Windows 7 Enterprise Windows 7 Professional Windows 7 Home Premium Windows 7 Home Basic Windows 7 Starter Еще…Меньше

В данной статье описывается проблема, возникающая в службе FTP на компьютере под управлением Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Пакет обновления 1 (SP1) для Windows 7 или Windows Server 2008 R2 с пакетом обновления 1. Доступно исправление для решения этой проблемы. Исправление с условием.

Симптомы

Эта проблема возникает при попытке загрузить файл, пока выполняется запись файла, даже если файл был открыт в приложение, которое выполняет запись в файл, указав значение FILE_SHARE_READ для режим общего доступа. При возникновении этой проблемы не удается загрузить файл, и служба FTP возвращает сообщение об ошибке, подобное приведенному ниже:


550 процесс файл недоступен, поскольку он используется другим процессом.

Сведения об исправлении

Важно. Языковой пакет не следует устанавливать после установки этого исправления. В противном случае языковые изменения в исправление не будет применяться, и будет необходимо повторно установить исправление. Дополнительные сведения содержатся в статье Установка языковых пакетов для Windows.

Существует исправление от корпорации Майкрософт. Однако данное исправление предназначено для устранения только проблемы, описанной в этой статье. Применяйте данное исправление только в тех системах, которые имеют данную проблему.

Если исправление доступно для скачивания, имеется раздел «Пакет исправлений доступен для скачивания» в верхней части этой статьи базы знаний. Если этого раздела нет, отправьте запрос в службу технической поддержки для получения исправления.

Примечание. Если наблюдаются другие проблемы или необходимо устранить неполадки, вам может понадобиться создать отдельный запрос на обслуживание. Стандартная оплата за поддержку будет взиматься только за дополнительные вопросы и проблемы, которые не соответствуют требованиям конкретного исправления. Полный список телефонов поддержки и обслуживания клиентов корпорации Майкрософт или создать отдельный запрос на обслуживание посетите следующий веб-узел корпорации Майкрософт:

http://support.microsoft.com/contactus/?ws=supportПримечание. В форме «Пакет исправлений доступен для скачивания» отображаются языки, для которых доступно исправление. Если нужный язык не отображается, значит исправление для данного языка отсутствует.

Предварительные условия

Для установки этого исправления необходимо иметь апреля 2014 накопительный пакет обновления для Windows RT 8.1, Windows 8.1 и Windows Server 2012 R2 (2919355) , установленной в Windows Server 2012 R2 или Windows 8.1. Или установите Пакет обновления 1 для Windows 7 или Windows Server 2008 R2.

Сведения о реестре

Для использования исправления из этого пакета нет необходимости вносить изменения в реестр.

Необходимость перезагрузки

Может потребоваться перезагрузить компьютер после установки данного исправления.

Сведения о замене исправлений

Это исправление не заменяет ранее выпущенные исправления.

Глобальная версия этого исправления устанавливает файлы с атрибутами, указанными в приведенных ниже таблицах. Дата и время для файлов указаны в формате UTC. Дата и время для файлов на локальном компьютере отображаются в местном времени с вашим текущим смещением летнего времени (DST). Кроме того, при выполнении определенных операций с файлами, даты и время могут изменяться.

Сведения о файле Windows 8.1 и Windows Server 2012 R2 и заметки

Важно. Windows Server 2012 R2 исправления и исправления Windows 8.1 включаются в тех же самых пакетов. Однако исправления на странице запроса исправлений перечислены под обеими операционными системами. Для получения пакета исправлений, который применяется к одной или обеих операционных систем, установите исправления, перечисленные в разделе «Windows 8.1/Windows Server 2012 R2» на странице. Всегда смотрите раздел «Информация в данной статье относится к следующим продуктам» статьи для определения фактических операционных систем, к которым применяется каждое исправление.

  • Файлы МАНИФЕСТА (.manifest) и MUM (.mum), устанавливаемые для каждой среды

    указаны отдельно в разделе «сведения о дополнительных файлах для Windows 8.1 и Windows Server 2012 R2». MUM, MANIFEST и связанные файлы каталога безопасности (.cat) очень важны для поддержания состояния обновленных компонентов. Файлы каталога безопасности, для которых не перечислены атрибуты, подписаны цифровой подписью корпорации Майкрософт.

Для всех поддерживаемых 32-разрядных версий Windows 8.1

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

8.5.9600.17725

16,896

11-Mar-2015

01:05

x86

Ftpctrlps.dll

8.5.9600.17725

10,240

11-Mar-2015

01:17

x86

Ftpmib.dll

8.5.9600.17725

10 752

11-Mar-2015

01:15

x86

Ftpres.dll

8.5.9600.16384

14,848

22-Aug-2013

04:16

x86

Ftpsvc.dll

8.5.9600.17725

344,064

11-Mar-2015

00:57

x86

Ftpsvc.mof

Неприменимо

69,990

21-Aug-2013

23:46

Неприменимо

Для всех поддерживаемых 64-разрядных версий Windows 8.1 и Windows Server 2012 R2

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

8.5.9600.17725

19,968

11-Mar-2015

01:44

x64

Ftpctrlps.dll

8.5.9600.17725

14,848

11-Mar-2015

01:59

x64

Ftpmib.dll

8.5.9600.17725

13,312

11-Mar-2015

01:56

x64

Ftpres.dll

8.5.9600.16384

14,848

22-Aug-2013

11:44

x64

Ftpsvc.dll

8.5.9600.17725

393,216

11-Mar-2015

01:33

x64

Ftpsvc.mof

Неприменимо

69,990

22-Aug-2013

06:51

Неприменимо

Сведения о файле Windows 8 и Windows Server 2012 и заметки

Важно. Исправления для Windows Server 2012 и Windows 8 исправления включены в те же пакеты. Однако исправления на странице запроса исправлений перечислены под обеими операционными системами. Чтобы запросить пакет исправлений, который применяется к одной или обеих операционных систем, установите исправление, описанное в разделе «Windows 8 и Windows Server 2012» на странице. Всегда смотрите раздел «Информация в данной статье относится к следующим продуктам» статьи для определения фактических операционных систем, к которым применяется каждое исправление.

  • Файлы МАНИФЕСТА (.manifest) и MUM (.mum), устанавливаемые для каждой среды

    указаны отдельно в разделе «сведения о дополнительных файлах для Windows 7 и Windows Server 2008 R2». MUM, MANIFEST и связанные файлы каталога безопасности (.cat) очень важны для поддержания состояния обновленных компонентов. Файлы каталога безопасности, для которых не перечислены атрибуты, подписаны цифровой подписью корпорации Майкрософт.

Для всех поддерживаемых версий Windows 8 для систем на базе x86

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

8.0.9200.16384

15,360

26-Jul-2012

03:18

x86

Ftpctrlps.dll

8.0.9200.16384

10,240

26-Jul-2012

03:18

x86

Ftpmib.dll

8.0.9200.16384

10 752

26-Jul-2012

03:18

x86

Ftpres.dll

8.0.9200.16384

14,848

26-Jul-2012

02:44

x86

Ftpsvc.dll

8.0.9200.21616

319,488

07-Sep-2015

15:17

x86

Ftpsvc.mof

Неприменимо

69,990

25-Jul-2012

20:18

Неприменимо

Для всех поддерживаемых версий x64 под управлением Windows 8 и Windows Server 2012

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

8.0.9200.16384

17,920

26-Jul-2012

03:05

x64

Ftpctrlps.dll

8.0.9200.16384

14,336

26-Jul-2012

03:05

x64

Ftpmib.dll

8.0.9200.16384

13,312

26-Jul-2012

03:05

x64

Ftpres.dll

8.0.9200.16384

14,848

26-Jul-2012

02:34

x64

Ftpsvc.dll

8.0.9200.21616

369,664

07-Sep-2015

14:23

x64

Ftpsvc.mof

Неприменимо

69,990

25-Jul-2012

20:16

Неприменимо

Сведения о файле Windows 7 и Windows Server 2008 R2 и заметки

Важно. Исправления для Windows Server 2008 R2 и Windows 7 включены в одни и те же пакеты. Однако исправления на странице запроса исправлений перечислены под обеими операционными системами. Чтобы запросить пакет исправления, который применяется к одной или обеим ОС, установите исправление, описанное в разделе «Windows 7/Windows Server 2008 R2» страницы. Всегда смотрите раздел «Информация в данной статье относится к следующим продуктам» статьи для определения фактических операционных систем, к которым применяется каждое исправление.

  • Файлы МАНИФЕСТА (.manifest) и MUM (.mum), устанавливаемые для каждой среды

    указаны отдельно в разделе «сведения о дополнительных файлах для Windows 7 и Windows Server 2008 R2». MUM, MANIFEST и связанные файлы каталога безопасности (.cat) очень важны для поддержания состояния обновленных компонентов. Файлы каталога безопасности, для которых не перечислены атрибуты, подписаны цифровой подписью корпорации Майкрософт.

Для всех поддерживаемых 86-разрядных версий Windows 7

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

7.5.7601.22982

16 384

05-Mar-2015

04:10

x86

Ftpctrlps.dll

7.5.7601.22982

9,728

05-Mar-2015

04:10

x86

Ftpmib.dll

7.5.7601.22982

10,240

05-Mar-2015

04:10

x86

Ftpres.dll

7.5.7601.22982

14,848

05-Mar-2015

04:06

x86

Ftpsvc.dll

7.5.7601.22982

310,272

05-Mar-2015

04:10

x86

Ftpsvc.mof

Неприменимо

69,252

05-Mar-2015

01:25

Неприменимо

Для всех поддерживаемых 64-разрядных версий Windows 7 и Windows Server 2008 R2

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

7.5.7601.22982

18,432

05-Mar-2015

04:23

x64

Ftpctrlps.dll

7.5.7601.22982

13,824

05-Mar-2015

04:23

x64

Ftpmib.dll

7.5.7601.22982

12 800

05-Mar-2015

04:23

x64

Ftpres.dll

7.5.7601.22982

14,848

05-Mar-2015

04:19

x64

Ftpsvc.dll

7.5.7601.22982

351,232

05-Mar-2015

04:23

x64

Ftpsvc.mof

Неприменимо

69,252

05-Mar-2015

01:15

Неприменимо

Для всех поддерживаемых версий Windows Server 2008 R2 для систем на базе процессоров IA-64

Имя файла

Версия файла

Размер файла

Дата

Время

Платформа

Ftpconfigext.dll

7.5.7601.22982

40,960

05-Mar-2015

03:31

IA-64

Ftpctrlps.dll

7.5.7601.22982

22,528

05-Mar-2015

03:31

IA-64

Ftpmib.dll

7.5.7601.22982

23,552

05-Mar-2015

03:31

IA-64

Ftpres.dll

7.5.7601.22982

14,848

05-Mar-2015

03:27

IA-64

Ftpsvc.dll

7.5.7601.22982

786,432

05-Mar-2015

03:31

IA-64

Ftpsvc.mof

Неприменимо

69,252

05-Mar-2015

01:07

Неприменимо

Сведения о дополнительных файлах

Сведения о дополнительных файлах для Windows 8.1 и для Windows Server 2012 R2

Дополнительные файлы для всех поддерживаемых 32-разрядных версий Windows 8.1

Свойства файла

Значение

Имя файла

X86_88477c24b79c92385578f0352a6516ea_31bf3856ad364e35_6.3.9600.17725_none_5ff770c55b197b27.manifest

Версия файла

Неприменимо

Размер файла

698

Дата (UTC)

11-Mar-2015

Время (UTC)

18:44

Платформа

Неприменимо

Имя файла

X86_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.3.9600.17725_none_df4cabbbb108f83e.manifest

Версия файла

Неприменимо

Размер файла

25,960

Дата (UTC)

11-Mar-2015

Время (UTC)

18:48

Платформа

Неприменимо

Дополнительные файлы для всех поддерживаемых версий на базе x64 Windows 8.1 и Windows Server 2012 R2

Свойства файла

Значение

Имя файла

Amd64_4c334a7f318e7e5b0bdf61bacbd3b9cd_31bf3856ad364e35_6.3.9600.17725_none_840b577ca9139d62.manifest

Версия файла

Неприменимо

Размер файла

1,046

Дата (UTC)

11-Mar-2015

Время (UTC)

18:44

Платформа

Неприменимо

Имя файла

Amd64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.3.9600.17725_none_3b6b473f69666974.manifest

Версия файла

Неприменимо

Размер файла

25,966

Дата (UTC)

11-Mar-2015

Время (UTC)

18:44

Платформа

Неприменимо

Имя файла

Wow64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.3.9600.17725_none_45bff1919dc72b6f.manifest

Версия файла

Неприменимо

Размер файла

11,518

Дата (UTC)

11-Mar-2015

Время (UTC)

02:14

Платформа

Неприменимо

Сведения о дополнительных файлах для Windows 8 и Windows Server 2012

Дополнительные файлы для всех поддерживаемых версий Windows 8 для систем на базе x86

Свойства файла

Значение

Имя файла

Update.mum

Версия файла

Неприменимо

Размер файла

1,796

Дата (UTC)

07-Sep-2015

Время (UTC)

20:09

Платформа

Неприменимо

Имя файла

X86_45c1a58d100ee3357dacc59a34b0a8c1_31bf3856ad364e35_6.2.9200.21616_none_685dff9493f2bf6a.manifest

Версия файла

Неприменимо

Размер файла

698

Дата (UTC)

07-Sep-2015

Время (UTC)

20:09

Платформа

Неприменимо

Имя файла

X86_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.2.9200.21616_none_47ed5c4a7feacaa3.manifest

Версия файла

Неприменимо

Размер файла

25,960

Дата (UTC)

07-Sep-2015

Время (UTC)

20:13

Платформа

Неприменимо

Дополнительные файлы для всех поддерживаемых версий x64 под управлением Windows 8 и Windows Server 2012

Свойства файла

Значение

Имя файла

Amd64_b087fa0c367f7370602f10d4508f20b2_31bf3856ad364e35_6.2.9200.21616_none_f2e8ac0ad63dacec.manifest

Версия файла

Неприменимо

Размер файла

1,046

Дата (UTC)

07-Sep-2015

Время (UTC)

20:09

Платформа

Неприменимо

Имя файла

Amd64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.2.9200.21616_none_a40bf7ce38483bd9.manifest

Версия файла

Неприменимо

Размер файла

25,966

Дата (UTC)

07-Sep-2015

Время (UTC)

20:09

Платформа

Неприменимо

Имя файла

Update.mum

Версия файла

Неприменимо

Размер файла

2,014

Дата (UTC)

07-Sep-2015

Время (UTC)

20:09

Платформа

Неприменимо

Имя файла

Wow64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.2.9200.21616_none_ae60a2206ca8fdd4.manifest

Версия файла

Неприменимо

Размер файла

11,518

Дата (UTC)

07-Sep-2015

Время (UTC)

15:37

Платформа

Неприменимо

Сведения о дополнительных файлах для Windows 7 и Windows Server 2008 R2

Дополнительные файлы для всех поддерживаемых 86-разрядных версий Windows 7

Свойства файла

Значение

Имя файла

X86_e4fb02832e7fb01c91d04ed77281e7c7_31bf3856ad364e35_6.1.7601.22982_none_6e54d57c40f84bd9.manifest

Версия файла

Неприменимо

Размер файла

698

Дата (UTC)

05-Mar-2015

Время (UTC)

18:10

Платформа

Неприменимо

Имя файла

X86_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.1.7601.22982_none_4cae5c2b0d3b3de6.manifest

Версия файла

Неприменимо

Размер файла

29,360

Дата (UTC)

05-Mar-2015

Время (UTC)

04:38

Платформа

Неприменимо

Дополнительные файлы для всех поддерживаемых 64-разрядных версий Windows 7 и Windows Server 2008 R2

Свойства файла

Значение

Имя файла

Amd64_b93790dbe7a40a5efb8702b6f12cedf6_31bf3856ad364e35_6.1.7601.22982_none_d9aeae6490df6469.manifest

Версия файла

Неприменимо

Размер файла

1,046

Дата (UTC)

05-Mar-2015

Время (UTC)

18:11

Платформа

Неприменимо

Имя файла

Amd64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.1.7601.22982_none_a8ccf7aec598af1c.manifest

Версия файла

Неприменимо

Размер файла

29,366

Дата (UTC)

05-Mar-2015

Время (UTC)

04:48

Платформа

Неприменимо

Имя файла

Wow64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.1.7601.22982_none_b321a200f9f97117.manifest

Версия файла

Неприменимо

Размер файла

11,568

Дата (UTC)

05-Mar-2015

Время (UTC)

04:33

Платформа

Неприменимо

Дополнительные файлы для всех поддерживаемых версий Windows Server 2008 R2 с архитектурой IA-64

Свойства файла

Значение

Имя файла

Ia64_157ca3abf4ced819a8b64f4c9aa67d48_31bf3856ad364e35_6.1.7601.22982_none_8bde54fca1a45ba4.manifest

Версия файла

Неприменимо

Размер файла

1,044

Дата (UTC)

05-Mar-2015

Время (UTC)

18:10

Платформа

Неприменимо

Имя файла

Ia64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.1.7601.22982_none_4cb000210d3946e2.manifest

Версия файла

Неприменимо

Размер файла

29,363

Дата (UTC)

05-Mar-2015

Время (UTC)

04:21

Платформа

Неприменимо

Имя файла

Wow64_microsoft-windows-iis-ftpsvc_31bf3856ad364e35_6.1.7601.22982_none_b321a200f9f97117.manifest

Версия файла

Неприменимо

Размер файла

11,568

Дата (UTC)

05-Mar-2015

Время (UTC)

04:33

Платформа

Неприменимо

Статус

Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».

Ссылки

См. термины , которые корпорация Майкрософт использует для описания обновлений программного обеспечения.

Нужна дополнительная помощь?

  • Remove From My Forums
  • Question

  • Hello there,

    For the past few days we are running into a problem when using FTP Task in SSIS

    Cannot able to send files to a FTP Server, while sending a file we receive an error «The remote server returned an error: (550) File unavailable (e.g., file not found, no access).»

    After lots of searching, some suggest that it is not an error but an information as the file is not present in server. We tried switching to a different ftp server and the same code is fine and sends files without any problems.

    So I decided to switch FTP Task to Script Task where I do upload using WebClient. Even after handling with FtpStatusCode.ActionNotTakenFileUnavailable, cannot able to send files (FTP Upload). Here is the code excerpt

                try
                {
                    var files = new List<string>();
                    foreach (var conn in Dts.Connections)
                    {
                        if (conn.CreationName == "FLATFILE")
                        {
                            files.Add(conn.ConnectionString);
                            using (WebClient client = new WebClient())
                            {
                                //client.UploadDataCompleted
                                client.Credentials = new NetworkCredential("xxx", "xxx");
                                Uri input = new Uri(Path.Combine( @"ftp://xxx/Incoming/", Path.GetFileName(conn.ConnectionString)));
                                try
                                {
                                    client.UploadFile(input, "STOR", conn.ConnectionString);
                                }
                                catch (WebException we)
                                {
                                    var resp = (FtpWebResponse)we.Response;
                                    if (resp.StatusCode != FtpStatusCode.ActionNotTakenFileUnavailable) throw;
                                }
                                
    
                            }
                            //break;
                        }
                    }
                    Dts.Variables["User::FtpFilesCollection"].Value = files;
                    Dts.TaskResult = (int)ScriptResults.Success;
    
                }
                catch (System.Exception e)
                {
                    Dts.Events.FireError(0, "Shops", e.ToString(), string.Empty, 0);
                }

    This is the WebException I receive after the WebClient.UploadFile

    {«The remote server returned an error: (550) File unavailable (e.g., file not found, no access).»}
    System.Net.WebException
    [System.Net.FtpWebResponse]
    {System.Net.FtpWebResponse} System.Net.FtpWebResponse
    + base
    {System.Net.FtpWebResponse} System.Net.WebResponse {System.Net.FtpWebResponse}
    BannerMessage
    «220 (vsFTPd 3.0.2)rn» string
    ContentLength
    0 long
    ExitMessage
    «» string
    + Headers
    {
    } System.Net.WebHeaderCollection
    + LastModified
    {01/01/0001 00:00:00} System.DateTime
    + ResponseUri
    {ftp://xxxx/Incoming/NEGSERV2020031719.chk}
    System.Uri
    StatusCode
    ActionNotTakenFileUnavailable System.Net.FtpStatusCode
    StatusDescription
    «550 Permission denied.rn»
    string
    SupportsHeaders
    true bool
    WelcomeMessage
    «230 Login successful.rn»
    string

    I really appreciate your suggestions and tips

    Stay safe and well,

    Holy

    • Edited by

      Tuesday, March 17, 2020 6:21 PM
      correction

Hello,

I am writing this code for .txt files download:-

public string[] ReadBOMFileList()
{
    string[] mydownloadFiles;
    StringBuilder myresult = new StringBuilder();
    
    StreamReader myreader = null;
    FtpWebRequest myreqFTP = null;

    try
    {
        FTPSettings.IP = "abc.com/Project/TXN_BAAN/3DS_BOM";
        FTPSettings.UserID = "abc";
        FTPSettings.Password = "abc";
        myreqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + FTPSettings.IP + "/"));
        myreqFTP.Method = WebRequestMethods.Ftp.ListDirectory;
        myreqFTP.UseBinary = true;
        myreqFTP.Credentials = new NetworkCredential(FTPSettings.UserID, FTPSettings.Password);
        FtpWebResponse response = (FtpWebResponse)myreqFTP.GetResponse();
        myreader = new StreamReader(response.GetResponseStream());
        string myline = myreader.ReadLine();
        while (myline != null)
        {
            myresult.Append(myline);
            myresult.Append("n");
            myline = myreader.ReadLine();
        }
        
        myresult.Remove(myresult.ToString().LastIndexOf('n'), 1);
        return myresult.ToString().Split('n');
    }
    catch (Exception ex)
    {
        if (myreader != null)
        {
            myreader.Close();
        }
        mydownloadFiles = null;
        return mydownloadFiles;
    }
}

private void DownloadBOMFile(string file)
{
    try
    {
        FTPSettings.IP = "abc.com/Project/TXN_BAAN";
        FTPSettings.UserID = "abc";
        FTPSettings.Password = "abc";
        string uri = "ftp://" + FTPSettings.IP + "/" + "3DS_BOM" + "/" + file;
        Uri serverUri = new Uri(uri);
        if (serverUri.Scheme != Uri.UriSchemeFtp)
        {
            return;
        }
        FtpWebRequest reqFTP;
        reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + FTPSettings.IP + "/" + "3DS_BOM" + "/" + file));
        reqFTP.Credentials = new NetworkCredential(FTPSettings.UserID, FTPSettings.Password);
        reqFTP.KeepAlive = false;
        reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
        reqFTP.UseBinary = true;
        reqFTP.Proxy = null;
        reqFTP.UsePassive = false;
        FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
        Stream responseStream = response.GetResponseStream();
        if (!Directory.Exists(@"C:AdminDB3DS_BOM"))
            Directory.CreateDirectory(@"C:AdminDB3DS_BOM");
        FileStream writeStream = new FileStream(@"C:AdminDB3DS_BOM" + file, FileMode.Create);

        int Length = 2048;
        Byte[] buffer = new Byte[Length];
        int bytesRead = responseStream.Read(buffer, 0, Length);
        while (bytesRead > 0)
        {
            writeStream.Write(buffer, 0, bytesRead);
            bytesRead = responseStream.Read(buffer, 0, Length);
        }
        writeStream.Close();
        response.Close();
    }
    catch (WebException wEx)
    {
        TraceService(wEx.Message.ToString());
    }
    catch (Exception ex)
    {
        TraceService(ex.Message.ToString());
    }
}

public static class FTPSettings
{
    public static string IP { get; set; }
    public static string UserID { get; set; }
    public static string Password { get; set; }
}

string[] BOMfiles = ReadBOMFileList();
foreach (string BOMfile in BOMfiles)
{
    DownloadBOMFile(BOMfile);
}

My code getting error regarding

«the remote server returned an error (550) file unavailable (e.g. file not found no access).»

How will be fixed this error?

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer


You either don’t have access to the files at the folder/path you gave the FtpClient or the files don’t exist.

You’ll have to double-check the filepath string your code is building and make sure the file exists. If it does, then you’ve got a permissions problem that your code cannot do anything about.

You can try to access the actual response message from the server using the ((FtpWebResponse)e.Response).StatusDescription property to get an insight into the specific error

try
{
        
}
catch(WebException e)
{
        String status = ((FtpWebResponse)e.Response).StatusDescription;
}

Cheers,
Edo

Updated 28-May-14 22:30pm

Even i faced same issue, But its very simple to fix it. You need to handle the escape sequence, Which we miss often.
use abc.com//Project//TXN_BAAN//3DS_BOM instead abc.com/Project/TXN_BAAN/3DS_BOM

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject,
20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8
+1 (416) 849-8900

Hi. I’m failing to upload in C# anything to the FileZilla Server. I’ve been a developer for decade, and the C# code does and will work on a Windows FTP Server, but fails with the FileZilla Server:

Basically what I am showing you is a (a) C# class, (b) that calls an “UploadFile” function by passing to it 5 parameters: (1) a Local File path, (2) a Remote File Path, (3) the FTP url, in this case an IP Address, (4) the UserName, and (5) the account Password. In this case the local file to be Uploaded is in a local directory as “C:PollofPollsPollofPollsApp_DataAdvertisementRates.xml”. The output URL on the remote server is this: “ftp://00.000.000.000//App_Data/AdvertisementRates.xml”. (This is an example. I did not use zeros. In a real test, this is the Server’s IP address.)

The function always fails in trying to establish communication with the FTP Server [ ftpStream = ftpRequest.GetRequestStream() ]. If ftpRequest.Passive is set to “true”, then the error message upon failure is “The remote server returned an error: (550) File unavailable (e.g., file not found, no access).”. If the ftpRequest.Passive is set to “false”, then the error message is “The remote server returned an error: 227 Entering Passive Mode (34,232,100,121,192,8)rn.”. The C# function which is not working with FileZila is this.

public bool UploadFile(string strLocalFile, string strRemoteFile, string strFTPHost, string strUserName, string strPassword)
{
// Output file to remote App Data directory
byte[] byteBuffer;
int intBufferSize = 2048; // Buffer size.
string strErrorMessage = «»; // Error Message upon failure.
FtpWebRequest ftpRequest = null; // FTP Request object.
Stream ftpStream = null; // FTP Stream
bool bolSuccess = true; // Assume «true» for success. If errors out, then «false» for failure.
int intWriteBytes = 0; // Bytes being written out

string strRemotePath = strFTPHost + «/» + strRemoteFile; // Becomes essentially: ftp://00.000.000.000//App_Data/AdvertisementRates.xml
System.IO.FileStream fsLocalStream;
try
{
ftpRequest = (FtpWebRequest)FtpWebRequest.Create(strRemotePath); // Create an FTP Request to ftp://00.000.000.000//App_Data/AdvertisementRates.xml
ftpRequest.Credentials = new NetworkCredential(strUserName, strPassword); // Log in to the FTP Server with the User Name and Password Provided
ftpRequest.UseBinary = true; // When in doubt, use these options
ftpRequest.UsePassive = false; // POTENTIAL ERROR: Was = true. But to keep active changed to = false for FileZilla Server.
ftpRequest.KeepAlive = true;
ftpRequest.EnableSsl = false;
ftpRequest.Method = WebRequestMethods.Ftp.UploadFile; // Specify the Type of FTP Request [ ERRORS OUT ]
ftpStream = ftpRequest.GetRequestStream(); // Establish Return Communication with the FTP Server
fsLocalStream = System.IO.File.OpenRead(strLocalFile); // Open a File Stream to Read the File for Upload, at
// C:PollofPollsPollofPollsApp_DataAdvertisementRates.xml
byteBuffer = new byte[intBufferSize]; // Buffer for the Downloaded Data
intWriteBytes = fsLocalStream.Read(byteBuffer, 0, intBufferSize); // (1) Read in first bytes of the file.
try // Upload the File by Sending the Buffered Data Until the Transfer is Complete
{
while (intWriteBytes > 0)
{
ftpStream.Write(byteBuffer, 0, intWriteBytes); // Write out bytes from the prior Read (1) or (2) if looping through the file.
intWriteBytes = fsLocalStream.Read(byteBuffer, 0, intBufferSize); // (2) Read in next string of bytes, if any still exist
}
}
catch (Exception ex) // Discover errors in the reading and writing to the Upload directory.
{
strErrorMessage = ex.Message;
bolSuccess = false;
}
fsLocalStream.Close(); // (3) Resource Cleanup
ftpStream.Close();
ftpRequest = null;
}
catch (Exception ex) // Discover Errors upon connection.
{ // If .UsePassive = false (therefore Active = true) then produced error message is this:
bolSuccess = false; // «The remote server returned an error: 227 Entering Passive Mode (34,232,100,121,192,8)rn.»
strErrorMessage = ex.Message; // If .UsePassive = true (therefore Active = false) then produced error message is this:
} // «The remote server returned an error: (550) File unavailable (e.g., file not found, no access).»
return bolSuccess; // Return Success or failure.
}

Please advise if there is any C# correction required for this function to run on FileZilla. I really need this to work.

Concerning environment, The Client is a Window 10 workstation. The failures occur with or without the Firewall on or off. The Host server is an Amazon AWS Windows Server 2012, using FileZilla Server version 0.9.44beta. Since I am new to both the FileZilla Server and Amazon AWS, there could be a setting errors. Here are the settings on AWS that I am aware of which could be affecting performance.

(1) Within the AWS Management Console, the Security Groups has within the Inbound tab, a Custom TCP Rule with the Port Range of 50000-51000 and Source set to 0.0.0.0/0.
(2) A second Custom TCP Rule is established for the Port Range of 20-21 and Source set to 0.0.0.0/0.
On the FileZilla Server, I have made the following settings:
(1) On the General Settings tap, I left the Listener on Port 21.
(2) Under “Passive Mode Settings”, I was advised to set the custom port range from 49152 to 65535.
(3) The FileZilla Server is set to the Elastic IP address of Server, which serves as the Public DNS IP address on the Passive Mode settings tab.
(4) I created within FileZilla Server a “Normal Users” group, and set up four users for my personal use.

Within the Windows Server 2012 Administrative Tools, under Windows Firewall and Advanced Security, I created two FTP Inbound Rules:
(1) The first rule following https://www.codeproject.com/Tips/404132 … -Instances was for TCP for all programs within the local port range of 49152-65535, and then for All Remote ports.
(2) The second rule for Rule was for all programs for any remote or local using Port 21, applied to Domain, Privat or Public

Please advise if there are any corrections to the AWS Server Inbound Rules, FileZila Server settings, or Windows Firewall settings that would cause my C# function to fail.

The only thing I notices as strange came from the FileZilla Client. When using the Windows Server FTP, I always set each client account in FileZilla Client to the Transfer Mode of “Default”. However, now referencing the FileZilla FTP Server from the FileZilla FTP Client, I found that every user would fail to log in. The connect would always follow the normal string of commands and events, but the Directory Listing would fail, and eventually time out. Nothing fully connected. However, when I changed the Transfer Setting to “Active” for each of the Client users, then Directory Listing for each user from the FileZilla Client succeeded and listed the contents of the server’s directory. I don’t know if that means anything, because why would something strange in performance from the FileZilla FTP Client reveal why C# programming could not connect at all UNLESS THIS strange behavior identified a problem with the FileZilla Server which presently may be affecting BOTH clients. Please advise.

Please advise if there is any C# correction required for this function to run on FileZilla. For me to use the FileZilla Server, I have to be able to connect to the FileZilla server, and be able to both upload and download to it programmatically.

Sincerely,
Pastor Burt :roll:

  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • [RESOLVED] «The remote server returned an error: (550) File unavailable (e.g., file not found, n

  1. Feb 19th, 2007, 04:57 PM


    #1

    blakemckenna is offline

    Thread Starter


    PowerPoster


    Resolved [RESOLVED] «The remote server returned an error: (550) File unavailable (e.g., file not found, n

    I get the above error when trying to upload a file to a valid server location. The program is a console app that takes 6 command line parameters. The parameters are as follows:

    1 C:
    2. FTP_test.txt
    3. \southern70
    4. FTP_test.txt
    5. vbpds
    6. sdpbv

    Here is the complete app. Look for <<<<< Error Occurs here >>>>> to see where the above error message hits.

    VB Code:

    1. Imports System.Net

    2. Imports System.IO

    3. Module Module1

    4.     Dim intEC As Integer = 0

    5.     Dim strMSG As String = ""

    6.     Dim mTargetAddress As String = ""

    7.     Dim mTargetFileName As String = ""

    8.     Dim mTargetFolder As String = ""

    9.     Dim mHostFolder As String = ""

    10.     Dim mHostFileName As String = ""

    11.     Dim mUserID As String = "vbpds"

    12.     Dim mPassword As String = "sdpbv"

    13.     Dim blnAbort As Boolean = False

    14.     Dim blnFirstTime As Boolean = True

    15.     Dim mErrorFileDirectory As String = "//southern/70"

    16.     '

    17.     '

    18.     '

    19.     Sub Main()

    20.         'The following list is the order in which the Parameters are to be placed on the command line.

    21.         'Each parameter is separated by a space. DO NOT USE QUOTES around each parameter

    22.         'Assuming there are 6 parameters that need to be sent from the command line, test

    23.         'to make sure they are all there. The first element in the array is the program

    24.         'name with path. Each parameter is separated by a space.

    25.         '

    26.         '   1. Host Folder Name

    27.         '   2. Host File Name to be transferred

    28.         '   3. Target Address, ie; \southern70

    29.         '   4. Target File Name to received

    30.         '   5. User ID

    31.         '   6. Password

    32.         Dim args() As String = Environment.GetCommandLineArgs()

    33.         Try

    34.             If args.Length <> 7 Then

    35.                 Throw New Exception(1)

    36.             End If

    37.             Dim x As Integer

    38.             For x = 1 To args.GetUpperBound(0)

    39.                 Select Case x

    40.                     Case "1"  'Host Folder Name

    41.                         If Directory.Exists(args(x)) Then

    42.                             mHostFolder = args(x)

    43.                         Else

    44.                             Throw New Exception(2)

    45.                         End If

    46.                     Case 2  'File Name to be transferred

    47.                         If File.Exists(args(1) & args(2)) Then

    48.                             mHostFileName = args(2)

    49.                         Else

    50.                             Throw New Exception(3)

    51.                         End If

    52.                     Case 3  'FTP Target Address

    53.                         If Directory.Exists(args(x)) Then

    54.                             mTargetAddress = "ftp:" & Replace(args(3), "", "/")

    55.                         Else

    56.                             Throw New Exception(3)

    57.                         End If

    58.                     Case 4  'Target File Name (not required)

    59.                         If args(4).Length > 0 Then

    60.                             mTargetFileName = args(4)

    61.                         End If

    62.                     Case 5

    63.                         If args(5) = mUserID Then

    64.                         Else

    65.                             Throw New Exception(5)

    66.                         End If

    67.                     Case 6

    68.                         If args(x) = mPassword Then

    69.                         Else

    70.                             Throw New Exception(6)

    71.                         End If

    72.                 End Select

    73.             Next

    74.             If Not blnAbort Then

    75.                 Dim resp As Exception

    76.                 resp = ExecuteFTPRequest()

    77.                 If resp Is Nothing Then

    78.                 Else

    79.                     strMSG = resp.Message

    80.                     WriteToErrorFile(strMSG)

    81.                 End If

    82.                 'Check the Return Code of the application on completion

    83.                 intEC = Environment.ExitCode

    84.             End If

    85.         Catch ex As Exception

    86.             blnAbort = True

    87.             Select Case ex.Message

    88.                 Case "1"

    89.                     strMSG = "Parameter list should contain 6 parameters only!"

    90.                 Case "2"

    91.                     strMSG = "Host Folder does not exist on Server!"

    92.                 Case "3"

    93.                     strMSG = "Host File does not exist!"

    94.                 Case "4"

    95.                     strMSG = "Target Folder does not exist!"

    96.                 Case "5"

    97.                     strMSG = "Invalid UserID"

    98.                 Case "6"

    99.                     strMSG = "Invalid Password"

    100.                 Case Else

    101.                     strMSG = ex.Message

    102.             End Select

    103.             WriteToErrorFile(strMSG)

    104.         End Try

    105.     End Sub

    106.     '

    107.     '

    108.     '

    109.     Private Function ExecuteFTPRequest() As Exception

    110.         Try

    111.             Dim pTargetDestination As String = mTargetAddress & "/" & mTargetFileName

    112.             Dim FTP As System.Net.FtpWebRequest = CType(FtpWebRequest.Create(pTargetDestination), FtpWebRequest)

    113.             FTP.Credentials = New System.Net.NetworkCredential(mUserID, mPassword)

    114.             FTP.KeepAlive = False

    115.             'We want a binary transfer, not textual data

    116.             FTP.UseBinary = True

    117.             FTP.Method = System.Net.WebRequestMethods.Ftp.UploadFile

    118.             Dim ds As Stream = FTP.GetRequestStream()

    119.             Using response As System.Net.FtpWebResponse = CType(FTP.GetResponse, System.Net.FtpWebResponse)

    120.                 Using responseStream As IO.Stream = response.GetResponseStream

    121.                     'loop to read & write to file

    122.                     Using fs As New IO.FileStream(mTargetFileName, IO.FileMode.Create)

    123.                         Dim buffer(2047) As Byte

    124.                         Dim read As Integer = 0

    125.                         Do

    126.                             read = responseStream.Read(buffer, 0, buffer.Length)

    127.                             fs.Write(buffer, 0, read)

    128.                         Loop Until read = 0 'see Note(1)

    129.                         responseStream.Close()

    130.                         fs.Flush()

    131.                         fs.Close()

    132.                     End Using

    133.                     responseStream.Close()

    134.                 End Using

    135.                 response.Close()

    136.             End Using

    137.         Catch ex As Exception

    138.             blnAbort = True

    139.             strMSG = ex.Message

    140.             WriteToErrorFile(strMSG)

    141.         End Try

    142.     End Function

    143.     '

    144.     '

    145.     '

    146.     Private Sub WriteToErrorFile(ByVal strMsg As String)

    147.         If blnFirstTime Then

    148.             blnFirstTime = False

    149.             If File.Exists(mErrorFileDirectory & "/ErrLog.txt") Then

    150.                 File.Delete(mErrorFileDirectory & "/ErrLog.txt")

    151.             End If

    152.         End If

    153.         Dim sw As New IO.StreamWriter(mErrorFileDirectory & "/ErrLog.txt", True)

    154.         sw.WriteLine(strMsg)

    155.         sw.Close()

    156.     End Sub

    157. End Module

    Last edited by blakemckenna; Feb 20th, 2007 at 11:01 AM.

    Blake


  2. Feb 19th, 2007, 06:20 PM


    #2

    blakemckenna is offline

    Thread Starter


    PowerPoster


    Re: «The remote server returned an error: (550) File unavailable (e.g., file not found, n

    anyone have an idea on this one?


  3. Feb 20th, 2007, 10:16 AM


    #3

    blakemckenna is offline

    Thread Starter


    PowerPoster


    Re: «The remote server returned an error: (550) File unavailable (e.g., file not found, n

    I’m just trying to keep this thread alive….ideas anyone???


  4. Feb 20th, 2007, 11:43 AM


    #4

    Re: «The remote server returned an error: (550) File unavailable (e.g., file not found, n

    I am not sure why you are getting the error you are, however here is a sample FTP class in a console app. You should be able to use it and taylor it to your needs. I tested it and it works pretty well.


  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • [RESOLVED] «The remote server returned an error: (550) File unavailable (e.g., file not found, n


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

FTP is a simple method to upload files to the server.

Although, it is rather easy to transfer files, FTP users often get stuck with errors. One such FTP error is “550 No such file or directory“.

Broadly speaking, this error means that the file or folder do not exist.

As part of our Outsourced Technical Support Services, we regularly fix these type of FTP errors for our customers.

Today, we’ll see the causes for the error “FTP 550 no such file or directory” and how our Support Engineers fix them.

What is FTP 550 error?

Firstly, let’s get a quick idea on the FTP 550 error.

The 5xx error falls under the permanent negative completion reply status of the FTP server. And, it means that the FTP server did not accept the command and the requested action did not take place. Further more, x5x error denotes File system errors in FTP server.
Overall, the 550 error means the file was not found or there are access restrictions for the file.

Causes for “FTP 550 no such file or directory”

Recently, one of our customers reported trouble with FTP upload. The logs of his FTP session looked as shown below.

STATUS:> Transferring file "/mydir/home.html"...
COMMAND:> SIZE home.html
550 home.html: No such file.
STATUS:> Requested action not taken (e.g., file or directory not found, no access).
COMMAND:> CWD /mydir/home.html
550 /mydir/home.html: No such file or directory.

Here, the customer was trying to PUT the file home.html via FTP. And that resulted in the error.

Now, let’s see the top causes for the error.

1. Incorrect path

Usually, “FTP 550 no such file or directory” error happens when the customers try to upload files from the wrong directory.

For example, when the file is present in the folder /home/user/abc.html, an attempt to upload from the path /home will cause this error.

This error also happens when customer uses the relative path in FTP.

2. Permission problems

Similarly, wrong permission on the files or folders can also cause this 550 error. When the user do not have privileges on the file they are trying to access, it will report the 550 error.

Additionally, a typo in the file name will also lead to this error.

3. Wrong Mount points

Again, we often see FTP 550 errors when users trying to access files in the mounted file systems.

For instance, recently a customer complained about the problems accessing files via FTP. In his server, he had a mounted file system. But, this mount failed after a server reboot. And, when he tried to access a file in this mounted directory, it resulted in the error:

550 : No such file or directory

How to fix FTP 550 error?

Till now, we saw the various causes for the FTP 550 error. Let’s now have a look on how to fix it.

We already know that the underlying reason for the FTP 550 error could be file not residing at the path.

That’s why, our Support Engineers first check the exact path that the customer uses via FTP. We connect to the server via SSH and confirm the presence of the file. If the file is not found on the path, we advise customer on the correct path. Or, for file name typo issues, we educate customer on the exact file name.

We always encourage customers to use the absolute path of the file in FTP connections.

Similarly, we check the server mount points and confirm the availability of file system and its contents too.

[Are you getting 550 error while accessing files via FTP?  We can quickly fix it for you.]

Conclusion

In short, FTP error “550 no such file or directory” happens mainly when the file do not exist at the path, due to permission problems, etc. Today, we saw the top causes for the error and how our Support Engineers fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Понравилась статья? Поделить с друзьями:
  • The operation couldn t be completed com apple compressor compressorkit errordomain error 1
  • The operation could not be completed because an error occurred while exporting error 41562
  • The operation cannot complete because of an unknown error иллюстратор
  • The operating system denied access to the specified file как исправить
  • The opengl driver doesn t support wglchoosepixelformatarb как исправить