question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error 550 while removing directory

See original GitHub issue

Bug Description I’m using this action to deploy current version of my app to an ftp. So one subdirectory is 1.0.0.1 then *.2 and so on. When the new version is compiled, the old folder does not exist, so this action tries to delete the old folder after removing every file. While removing the files works, the folder throws an error 550.

While this error is annoying I actually want to keep the old files. How do I achieve this or should I create a new issue?

My Action Config

name: Release Build

on:
  push:
    branches: [ master ]

jobs:
  build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2

[...]

    - name: FTP Deploy
      # You may pin to the exact commit or the version.
      # uses: SamKirkland/FTP-Deploy-Action@d2724c6194d42ae5d4d042070d51d23cbc6ad83f
      uses: SamKirkland/FTP-Deploy-Action@4.1.0
      with:
        server: example.org
        username: ${{secrets.FTPUSER}}
        password: ${{secrets.FTPPASS}}
        local-dir: /bin/Release/app.publish/
        server-dir: Release/
        log-level: verbose

My Action Log

[...]
  file removed
  completed
removing folder "Application Files/2_0_0_23/"
  removing folder "Application Files/2_0_0_23/"
> PWD
< 257 "/Release" is current directory.

> CWD Application Files/2_0_0_23/
< 250 CWD command successful.

> EPSV
< 229 Entering Extended Passive Mode (|||56277|)

> LIST -a
< 150 Opening BINARY mode data connection.

Downloading from 185.64.125.11:56277 (No encryption)
list progress for "". Progress: 0 bytes of 5990926 bytes
list progress for "". Progress: 0 bytes of 5990926 bytes
< 226 Transfer complete.


> CDUP
< 250 CDUP command successful.

> RMD Application Files/2_0_0_23/
< 550 

> CWD /Release
< 250 CWD command successful.


----------------------------------------------------------------
--------------  πŸ”₯πŸ”₯πŸ”₯ an error occurred  πŸ”₯πŸ”₯πŸ”₯  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------

FTPError: 550 
    at FTPContext._onControlSocketData (D:\a\_actions\SamKirkland\FTP-Deploy-Action\4.1.0\dist\index.js:3945:39)
    at Socket.<anonymous> (D:\a\_actions\SamKirkland\FTP-Deploy-Action\4.1.0\dist\index.js:3786:44)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 550
}
Error: FTPError: 550 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
hpohlmeyercommented, Jul 12, 2021

I think I have a similar problem. I have a cache folder, that is stored under a folder with the hash name (YCiIk-L5RdA4md0bJOcVZ) in this case:

.
β”œβ”€β”€ _next
β”‚Β Β  β”œβ”€β”€ YCiIk-L5RdA4md0bJOcVZ
β”‚Β Β  β”œβ”€β”€ data
β”‚Β Β  β”‚Β Β  └── YCiIk-L5RdA4md0bJOcVZ
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ about.json
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ imprint-and-privacy-policy.json
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ index.json
β”‚Β Β  β”‚Β Β      └── projects
β”‚Β Β  β”‚Β Β          └── …
β”‚Β Β  └── static
β”‚Β Β      β”œβ”€β”€ YCiIk-L5RdA4md0bJOcVZ
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ _buildManifest.js
β”‚Β Β      β”‚Β Β  └── _ssgManifest.js
β”‚Β Β      └── chunks
β”‚Β Β          β”œβ”€β”€ 152-7ab1abc6c13d3235b855.js
β”‚Β Β          β”œβ”€β”€ 359.cc8d6f69960526617398.js
β”‚Β Β          β”œβ”€β”€ 692-7146eebd06f6e375df5e.js
β”‚Β Β          β”œβ”€β”€ 880-215c3aaf15f82682a5c6.js
β”‚Β Β          β”œβ”€β”€ framework-92300432a1172ef1338b.js
β”‚Β Β          β”œβ”€β”€ main-63764e6f798785fe32b6.js
β”‚Β Β          β”œβ”€β”€ pages
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ 404-e01b388652e7d5730748.js
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ _app-e48ce355075a9938b0ee.js
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ _error-29c4e2af0a284d96407a.js
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ about-82ce9b20276feb313d46.js
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ imprint-and-privacy-policy-d75fb0cba6f07b8c1cba.js
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ index-8998c85b0d2a196dfe67.js
β”‚Β Β          β”‚Β Β  └── projects
β”‚Β Β          β”‚Β Β      └── [slug]-83c2d93795751aa4f2bc.js
β”‚Β Β          β”œβ”€β”€ polyfills-a54b4f32bdc1ef890ddd.js
β”‚Β Β          └── webpack-f4a8f7398bdb7252be2d.js

The next upload has a similar structure, but with a different hash. The action correctly detects, that the outdated cache folder should be deleted, but throws a 550 error, when it tries to remove the folder, after all files inside it have been removed.

removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file1.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file2.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file3.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file4.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file5.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file6.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file7.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file8.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file9.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file10.json"
removing "_next/data/YCiIk-L5RdA4md0bJOcVZ/projects/file11.json"
removing "_next/static/chunks/pages/about-155d6618472435777b04.js"
removing "_next/static/YCiIk-L5RdA4md0bJOcVZ/_buildManifest.js"
removing "_next/static/YCiIk-L5RdA4md0bJOcVZ/_ssgManifest.js"
removing folder "_next/data/YCiIk-L5RdA4md0bJOcVZ/"

----------------------------------------------------------------
--------------  πŸ”₯πŸ”₯πŸ”₯ an error occurred  πŸ”₯πŸ”₯πŸ”₯  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------

FTPError: 550 Can't remove directory: No such file or directory
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3945:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3786:44)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 550
}

The folder is empty, but still exists on the server. Deleting it manually works just fine. Might there be a problem with deleting empty folders?

2reactions
jorgsiegelcommented, Aug 13, 2021

Same error here. We are using FTP-Deploy-Action with Gatsby. It seems that it throws an error when trying to access (or delete?) an empty folder. Would be nice to have this fixed as right now we can’t use automatic deployment because of this bug…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Delete Folder, 550 Error Message - SmartFTP Forums
The directory seems to be deleted already, it probably only exists in the cache. Try pressing F5 to refresh the file / folder...
Read more >
550 Operation not permitted when deleting file through FTP
To delete a file, you need to have write permissions to the parent directory, not to the file itself.
Read more >
550 Permission Denied (or No such file or folder)
A file upload is being attempted but the remote server has denied the needed permission. The 550 error code is a result of...
Read more >
550 Remove directory operation failed. - FileZilla Forums
Hi, In FTP i am trying to delete some folders and all folders got permission 777 so its not the permissions that are...
Read more >
FTP error -- 550: The directory is not empty - 3Essentials Hosting
FTP error -- 550: The directory is not empty. Article ID: 1092 ; Back to Search ; This error may occur because there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found