Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

FTPPermError #67

Open
paulocesarpcfj opened this issue Oct 25, 2016 · 16 comments
Open

FTPPermError #67

paulocesarpcfj opened this issue Oct 25, 2016 · 16 comments

Comments

@paulocesarpcfj
Copy link

I'm getting this error. How can i fix it?

Successfully generated site
Sending site over FTP (host: 72.29.66.216, port: 21, ftps: false)
Connected to server. Sending site
 -> about
 -> index.html
 -> assets
 -> main.css
 -> bitbucket-pipelines.yml
 -> docker-compose.yml
 -> Dockerfile
 -> feed.xml
 -> feed.xslt.xml
 -> index.html
 -> jekyll
 -> update
 -> 2016
 -> 10
 -> 22
 -> welcome-to-jekyll.html
 -> README.md
/Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/ftp.rb:342:in `getresp': 501 No file name (Net::FTPPermError)
    from /Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/ftp.rb:367:in `block in sendcmd'
    from /Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    from /Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/ftp.rb:365:in `sendcmd'
    from /Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/ftp.rb:1002:in `delete'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:70:in `block in remove_files'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:69:in `each'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:69:in `remove_files'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:19:in `block in sync'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:29:in `block in connect'
    from /Users/paulocesarpcfj/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/ftp.rb:150:in `open'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:25:in `connect'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/lib/glynn/ftp.rb:17:in `sync'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/gems/glynn-1.3.0/bin/glynn:80:in `<top (required)>'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/bin/glynn:23:in `load'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/bin/glynn:23:in `<main>'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/paulocesarpcfj/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Thanks.

@dmathieu
Copy link
Owner

Paulo,

Looks like you're facing an issue with the new feature of deleting files missing locally.
I just pushed a commit logging which file we're trying to delete before doing so: 71a7d62

Could you try using glynn from the github repository to get that log and paste it here?

Thanks

@freakone
Copy link

@dmathieu I traced what is happening here. NLST command from FTP protocol does not support recursive listing, as Dir.Glob function. I have 1:1 copy on the server and this is happening:

ftp.nlst("#{distant}/**/*") result:

["", "", "/blog/public/css:", "", ".", "..", "animate.min.css", "main.css", "responsive.gs.12col.css", "", "", "/blog/public/images:", "", ".", "..", "eagle.png", "favicon.ico", "flower.png", "logo.png", "", "", "/blog/public/js:", "", ".", "..", "jquery.fitvids.js"]

Dir.glob("#{local}/**/*") result:

["C:/Users/Kamil/_dev/blog/_site/404.html", "C:/Users/Kamil/_dev/blog/_site/ecto-strange-error.html", "C:/Users/Kamil/_dev/blog/_site/feed.xml", "C:/Users/Kamil/_dev/blog/_site/Gemfile", "C:/Users/Kamil/_dev/blog/_site/Gemfile.lock", "C:/Users/Kamil/_dev/blog/_site/hello-world.html", "C:/Users/Kamil/_dev/blog/_site/index.html", "C:/Users/Kamil/_dev/blog/_site/LICENSE.md", "C:/Users/Kamil/_dev/blog/_site/public", "C:/Users/Kamil/_dev/blog/_site/public/css", "C:/Users/Kamil/_dev/blog/_site/public/css/animate.min.css", "C:/Users/Kamil/_dev/blog/_site/public/css/main.css", "C:/Users/Kamil/_dev/blog/_site/public/css/responsive.gs.12col.css", "C:/Users/Kamil/_dev/blog/_site/public/images", "C:/Users/Kamil/_dev/blog/_site/public/images/eagle.png", "C:/Users/Kamil/_dev/blog/_site/public/images/favicon.ico", "C:/Users/Kamil/_dev/blog/_site/public/images/flower.png", "C:/Users/Kamil/_dev/blog/_site/public/images/logo.png", "C:/Users/Kamil/_dev/blog/_site/public/js", "C:/Users/Kamil/_dev/blog/_site/public/js/jquery.fitvids.js", "C:/Users/Kamil/_dev/blog/_site/README.md", "C:/Users/Kamil/_dev/blog/_site/serial-port-details-in-c-sharp.html", "C:/Users/Kamil/_dev/blog/_site/stm-hal-usb-library-hard-fault.html", "C:/Users/Kamil/_dev/blog/_site/stm32-unique-id.html"]

So diff (ftp.nlst("#{distant}/**/*") - Dir.glob("#{local}/**/*")) is:

["", "", "/blog/public/css:", "", ".", "..", "animate.min.css", "main.css", "responsive.gs.12col.css", "", "", "/blog/public/images:", "", ".", "..", "eagle.png", "favicon.ico", "flower.png", "logo.png", "", "", "/blog/public/js:", "", ".", "..", "jquery.fitvids.js"]

In order to this function work properly you must make some changes:

  • make recursive FTP listing functionality
  • filter list out of dots, empty entries, etc.
  • strip local and remote paths to relative matching part
  • after that you can make subtraction, and delete unnecessary elements

Also, I think that this missing file removal should be optional, to activate in the .yml file. I personally don't want to delete any data from my server without confirmation.

If you want some additional logs just let me know.

@paulocesarpcfj
Copy link
Author

+1

@dmathieu
Copy link
Owner

All right, I've yanked the 1.3.0 version.
Any PR fixing this is more than welcome. I will not do it myself though, as I don't have any FTP server handy, and won't ever be able to verify this as working properly.

@dmathieu
Copy link
Owner

Also, I'm declaring bankruptcy on this repo. I haven't touched an FTP server in over 5 years, and there are much better ways of deploying static websites than with FTP today.

If anyone wants ownership of this repository, I will transfer it to whoever fixes this issue.

@paulocesarpcfj
Copy link
Author

Then the error will still occurring or will have a rollback?

Thanks!

@dmathieu
Copy link
Owner

You must uninstall and reinstall the gem. The error will not occur anymore.
Files missing locally will not be deleted in your FTP server anymore either.

@paulocesarpcfj
Copy link
Author

Thanks, it worked!

@dmathieu
Copy link
Owner

I'm leaving this issue open, as yanking a gem is not a long-term solution :)

@128keaton
Copy link

@dmathieu you mention that there are better methods for deploying a static website than over FTP. What other 'recommended' methods are there?

@dmathieu
Copy link
Owner

GitHub Pages; Heroku static; Amazon S3 are the ones that come out of my mind.

@128keaton
Copy link

@dmathieu I get some ridiculously cheap hosting from DirectNic (with excellent uptime and support), but without any command-line access. I guess for me, FTP is still the way to go then

@dmathieu
Copy link
Owner

Feel free to fix this issue and I'll gladly transfer this repository to you :)

Note: GitHub Pages is free too.

@paulocesarpcfj
Copy link
Author

@dmathieu , i don't have much experience with github pages and these others mentioned. How about the domain ? For example, i want www.somesite.com, with the github page i can use this ? Or I need let the domain be www.somesite.github.com ?

But thanks for the information, i'm studying the possibilities of migrations.

@128keaton
Copy link

@dmathieu I'd love to, but I don't understand Ruby that well. Thanks anyway!
I'll look at GitHub pages, but the last time I checked, I couldn't get it working and for image hosting, it was terrible. On top of that, the documentation wasn't straightforward/helpful/clear

@dmathieu
Copy link
Owner

@paulocesarpcfj https://help.github.com/articles/using-a-custom-domain-with-github-pages/

neudabei added a commit to neudabei/jekyll that referenced this issue Oct 29, 2016
Remove Glynn as deployment option since that gem is no longer actively maintained. See notes on readme in repository: https://github.com/dmathieu/glynn and dmathieu/glynn#67
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants