Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Failed to change directory." error #323

Closed
Legion64 opened this issue Oct 6, 2022 · 1 comment
Closed

"Failed to change directory." error #323

Legion64 opened this issue Oct 6, 2022 · 1 comment

Comments

@Legion64
Copy link

Legion64 commented Oct 6, 2022

Bug Description
Hello, I am trying to deploy with ftp in the last step. But I am getting an error about not being able to change the file. I took a look at issue #220. But it was of no use to me.

My Action Config

name: Deploy to site

on:
  workflow_dispatch:
    inputs:
      branch:
        description: 'Branch to deploy'
        required: true
        default: 'main'
  pull_request:
    branches:
      - main

jobs:
  site-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: actions/setup-node@main
      
      - name: Installing project dependencies
        run: npm install

      - name: Building the project
        run: npm run build

      - name: Deploy
        uses: SamKirkland/FTP-Deploy-Action@4.3.0
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          local-dir: ./dist/
          server-dir: ./
          dangerous-clean-slate: true

My Action Log

----------------------------------------------------------------
Making changes to 1744 files/folders to sync server state
Uploading: 57.4 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------
creating folder "css/"

----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------

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

FTPError: 550 Failed to change directory.
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.2/dist/index.js:5254:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.2/dist/index.js:5095: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:188:23) {
  code: 550
}
Error: FTPError: 550 Failed to change directory.

vsftpd configuration

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
force_dot_files=YES
pasv_min_port=40000
pasv_max_port=50000
allow_writeable_chroot=YES

And my currently directory is /var/www/sma-crm/

When I try to log in myself with the FTP user, it connects directly to this directory. And if I type cd css/ I can access that directory without issue.

@Legion64
Copy link
Author

Legion64 commented Oct 6, 2022

Because of the root files that existed in the folder before, it could not perform the operation. I deleted all of them manually and restarted deploy and the problem went away.

@Legion64 Legion64 closed this as completed Oct 6, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant