cschlosser / drone-ftps

Deploy to FTPS server from Drone CI build
https://hub.docker.com/r/cschlosser/drone-ftps/
Apache License 2.0
20 stars 16 forks source link

Deploy error - mirror: Login failed: 500 OOPS: cannot change directory:/home/****** #22

Closed zeronacer closed 3 years ago

zeronacer commented 3 years ago

When Drone executes my deploy step, I get the following error: mirror: Login failed: 500 OOPS: cannot change directory:/home/******

This is my .drone.yml step (___ is censored):

  - name: deploy
    image: cschlosser/drone-ftps
    environment:
      FTP_USERNAME:
        from_secret: FTP_USERNAME
      FTP_PASSWORD:
        from_secret: FTP_PASSWORD
      PLUGIN_HOSTNAME: ___
      PLUGIN_DEST_DIR: /opt/wwwhome/___/static_site
      PLUGIN_SECURE: false
      PLUGIN_INCLUDE: index.html|style.css

From what I understand, this means that the DEST_DIR is not resolved from the server root, but from the /home directory? If yes, how to set it up right?

cschlosser commented 3 years ago

It should be resolved from the root directory of the ftps server.

/opt/wwwhome/___/static_site is this correct?

zeronacer commented 3 years ago

That's what I thought. But the error message says that it's trying to resolve from the /home directory if I'm not mistaken.

cschlosser commented 3 years ago

Can you try it with a different server and maybe leave PLUGIN_DEST_DIR empty or point it to /? Maybe there is something broken in the script that does the replacement with the variables even though I can't see it from the first glance and I'm using it myself with dots in the path.

zeronacer commented 3 years ago

Sorry for answering so late, but I haven't been in office for the past weeks.

I tried setting the PLUGIN_DEST_DIR to / and ./ and omitted it completely. In either case the error message stayed the same. I will discuss this issue with the department responsible for our servers. Maybe the cause of the issue is in some other place.

zeronacer commented 3 years ago

I finally found the issue. The problem was simply a misconfiguration of the user home directory for my FTP user in the server's passwd file. My company is sometimes a bit wonky concerning those details 😁