pocketarc / git-deploy-php

git-deploy-php is a simple php-based tool that deploys your Git repositories to FTP/SFTP servers, and keeps them updated automatically.
http://brunodebarros.github.io/git-deploy-php
291 stars 45 forks source link

Throwing ftp_mkdir(): Can't create directory errors? #60

Open bobrocke opened 9 years ago

bobrocke commented 9 years ago

After successfully uploading a bunch of files, I get this error:

[2015-04-25 17:05:52 -0400] Uploaded: user/plugins/materializer/materializer.php
[2015-04-25 17:05:52 -0400] Uploaded: user/plugins/materializer/materializer.yaml
[2015-04-25 17:06:00 -0400] Deleted: cache/twig/
PHP Warning:  ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/git-deploy:0
PHP   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
PHP   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
PHP   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

Warning: ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144

Call Stack:
    0.0016     236560   1. {main}() /usr/local/bin/git-deploy:0
    0.6203     438744   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
  387.7395   16126152   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
  387.7395   16126272   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

[2015-04-25 17:06:00 -0400] Created directory: cache/twig/
[2015-04-25 17:06:21 -0400] Deleted: cache/doctrine/
PHP Warning:  ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/git-deploy:0
PHP   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
PHP   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
PHP   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

Warning: ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144

Call Stack:
    0.0016     236560   1. {main}() /usr/local/bin/git-deploy:0
    0.6203     438744   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
  409.4625   16126224   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
  409.4625   16126272   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

[2015-04-25 17:06:21 -0400] Created directory: cache/doctrine/
[2015-04-25 17:06:23 -0400] Deleted: cache/compiled/
PHP Warning:  ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/git-deploy:0
PHP   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
PHP   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
PHP   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

Warning: ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144

Call Stack:
    0.0016     236560   1. {main}() /usr/local/bin/git-deploy:0
    0.6203     438744   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
  410.8614   16126224   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
  410.8614   16126272   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

[2015-04-25 17:06:23 -0400] Created directory: cache/compiled/
[2015-04-25 17:06:23 -0400] Deleted: cache/validated-
[2015-04-25 17:06:23 -0400] Created directory: cache/validated-
[2015-04-25 17:06:26 -0400] Deleted: images/
PHP Warning:  ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/git-deploy:0
PHP   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
PHP   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
PHP   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

Warning: ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144

Call Stack:
    0.0016     236560   1. {main}() /usr/local/bin/git-deploy:0
    0.6203     438744   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
  414.3723   16126224   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
  414.3723   16126272   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

[2015-04-25 17:06:26 -0400] Created directory: images/
[2015-04-25 17:06:27 -0400] Deleted: assets/
PHP Warning:  ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/git-deploy:0
PHP   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
PHP   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
PHP   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

Warning: ftp_mkdir(): Can't create directory: File exists in phar:///usr/local/bin/git-deploy/src/Ftp.php on line 144

Call Stack:
    0.0016     236560   1. {main}() /usr/local/bin/git-deploy:0
    0.6203     438744   2. Brunodebarros\Gitdeploy\Server->deploy() /usr/local/bin/git-deploy:52
  415.4329   16126224   3. Brunodebarros\Gitdeploy\Ftp->mkdir() phar:///usr/local/bin/git-deploy/src/Server.php:140
  415.4330   16126272   4. ftp_mkdir() phar:///usr/local/bin/git-deploy/src/Ftp.php:144

[2015-04-25 17:06:27 -0400] Created directory: assets/
[2015-04-25 17:06:28 -0400] Uploaded: user/themes/materialize/REVISION
[2015-04-25 17:06:28 -0400] Uploaded: user/themes/materialize/PREVIOUS_REVISION
[2015-04-25 17:06:28 -0400] Uploaded: user/plugins/materializer/REVISION
[2015-04-25 17:06:28 -0400] Uploaded: user/plugins/materializer/PREVIOUS_REVISION
[2015-04-25 17:06:28 -0400] Uploaded: REVISION
[2015-04-25 17:06:29 -0400] Uploaded: PREVIOUS_REVISION
[2015-04-25 17:06:29 -0400] Finished working on: ftp://bobrocke@ftp.bobrockefeller.com:21/public_html/materialize.bobrockefeller.com
[2015-04-25 17:06:29 -0400] Disconnected from: ftp://bobrocke@ftp.bobrockefeller.com:21/public_html/materialize.bobrockefeller.com

What might that be?

bobrocke commented 9 years ago

This is the .ini file run:

[production]
scheme = ftp
port = 21
user = REDACTED
pass = REDACTED
host = REDACTED
path = REDACTED
passive = true
ignore_files[] = .editorconfig
ignore_files[] = .gitignore
ignore_files[] = config.codekit
ignore_files[] = dandelion.yml
ignore_files[] = deployment-config.json
ignore_files[] = staging.yml
ignore_files[] = production.yml
ignore_files[] = htaccess.txt
ignore_files[] = .idea/*
ignore_files[] = nginx.conf
ignore_files[] = README.md
ignore_files[] = *.ini
clean_directories[] = cache/twig/
clean_directories[] = cache/doctrine/
clean_directories[] = cache/compiled/
clean_directories[] = cache/validated-
clean_directories[] = images/
clean_directories[] = assets/
pocketarc commented 9 years ago

Have removed private info from your comment.

bobrocke commented 9 years ago

Thanks! That was sloppy of me. Too quick of a copy/paste. :(

pocketarc commented 9 years ago

Time to change your password, just to be safe. I'm seeing this:

[2015-04-25 17:06:23 -0400] Deleted: cache/compiled/ [2015-04-25 17:06:23 -0400] Created directory: cache/compiled/

It looks like it's trying to empty the folders and then create them again. Can you try something for me? Put a file in one of those folders. Run git-deploy. See if that file is gone (but the folder is still there). I'm getting the feeling that it's emptying the folder but not deleting the folder itself, so when it tries to create it again, it fails.

bobrocke commented 9 years ago

I put a test text file in cache/compiled/, edited a file elsewhere to make a new git commit and reran git-deploy.

The test text file was not deleted, the dummy edit was uploaded, and the same errors were thrown.