SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.93k stars 374 forks source link

FTPError: 550 The process cannot access the file because it is being used by another process. #303

Open adeel-rana opened 2 years ago

adeel-rana commented 2 years ago

Bug Description I am facing the below error on the time when files are replacing/overwriting.

Sometimes this error occurs when multiple actions run in parallel to deploy the application on the same server with different directories and usernames.

My Action Config

on: push
name: Publish Website
jobs:
  web-deploy:
    - name: πŸ“‚ Sync files
       uses: SamKirkland/FTP-Deploy-Action@4.3.0
       with:
        server: <MY_SERVER>
        username: <MY_USERNAME>
        password:<MY_PASSWORD>
        local-dir: ./Release/
        log-level: verbose

My Action Log

   Making changes to 2 files/folders to sync server state
Uploading: 0 B -- Deleting: 0 B -- Replacing: 604 kB
replacing "CMS.dll"
-------------- πŸ”₯πŸ”₯πŸ”₯ an error occurred πŸ”₯πŸ”₯πŸ”₯ --------------
---------------------- full error below ----------------------
FTPError: 550 The process cannot access the file because it is being used by another process.
at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4774:39)
at Socket. (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4615:44)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:268:11)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onStreamRead (internal/stream_base_commons.js:1[88](https://github.com/AzeemArshad/CMS/runs/7373755805?check_suite_focus=true#step:9:89):23) {
code: 550
}
Error: FTPError: 550 The process cannot access the file because it is being used by another process.
Cyrildu31 commented 1 year ago

Hello, I have the same Issue. Did you found a fix ? Thank you.

PieterjanDeClippel commented 1 year ago

Same

mathdx1111 commented 8 months ago

How to fix it?

tuongduy10 commented 5 months ago

Same here, i use FileZilla and it works fine but the error occured at .dll file when replacing or uploading with FTP Deploy in github actions

![Uploading unnamed.png…]()

PieterjanDeClippel commented 5 months ago

Hi you can fix this by creating and uploading an app_offline.htm and waiting 3 seconds before running this action

Something like this however it's not perfect and may need to be tweaked

tuongduy10 commented 5 months ago

Thanks @PieterjanDeClippel i've fixed my problem Btw i've found the root cause after searching for a while, here is the anwser https://stackoverflow.com/a/68326476/22006469

yigitgnc commented 1 month ago

Hi you can fix this by creating and uploading an app_offline.htm and waiting 3 seconds before running this action

Something like this however it's not perfect and may need to be tweaked

thanks that's clever