wiki-sftp.mdwn 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. This website has several sections. The three main ones are the wiki, the git
  2. browser and the file browser. There are more sections, such as the CA subdomain
  3. and the documentation browser. Each section has a different technology powering
  4. it. The wiki is powered by [ikiwiki].
  5. ikiwiki wikis are often managed by putting their content under version control.
  6. This wiki is managed by a [git] repository. git is made for version control of
  7. text, and text difference algorithms don't make sense for binary files. Managing
  8. large/binary files under version control can quickly bring the repository to a
  9. huge size, taking long time to clone. That is true for any version control
  10. system, because a large file is a large file.
  11. The wiki therefore uses another mechanism, in parallel to git, for handling any
  12. files that aren't in plain text format. This mechanism is [[!wikipedia SFTP]].
  13. It's meant for images (especially raster ones like PNG and JPG), audio, video,
  14. executables, compressed files, document files that are internally compressed
  15. (such as OpenDocument) and so on.
  16. [[!template id=todo text="I remember I wrote somewhere else what should go into
  17. ftp - find that and put here"]]
  18. The SFTP part of the wiki works as an "underlay". It's a folder hierarchy with
  19. the same structure as a git repository, and its content is merged with the git
  20. repository's content. If a file with the same name exists in both, git's version
  21. is taken (that's why it's "underlay" and not "overlay"). SFTP gives access to
  22. the whole FTP server, but only the wiki area can be modified. Files can be
  23. added, removed and edited.
  24. **IMPORTANT**: Unlike with git, there is no version control of the files in
  25. SFTP. The server does make backups, but don't rely on them. If you need to keep
  26. many versions or have sensitive/critical content there, keep backups of it in
  27. case something bad happens, e.g. someone else deletes it by mistake.
  28. In addition to the whole-wiki SFTP access, each person can also have a personal
  29. SFTP-accessible underlay which maps to their personal area under the [[/people]]
  30. directory. This way you can manage your personal notes etc., feeling safer. But
  31. being able to write on other people's pages and discuss ideas together is a
  32. really cool and useful thing, so I suggest you keep your pages and text notes
  33. in the git repository, and use SFTP just for other things, e.g. images and
  34. audio.
  35. This page documents only the whole-wiki SFTP access.
  36. [ikiwiki]: http://ikiwiki.info
  37. [git]: http://git-scm.com
  38. # 1 :: Everything...
  39. There's still some work to do here! Decide if the personal SFTP gets its own
  40. page, decode if the intro should be under /access maybe, read about SFTP, learn
  41. how to use it myself, make screenshots, list several clients...
  42. For now, here's a quick list of the steps.
  43. 1. Generate an SSH key, if you don't have one yet.
  44. 2. Talk to [[fr33domlover]] and ask him to give you access to SFTP. If you
  45. already have write access to any git repository, he should already have your
  46. public SSH key. If not, you'll need to send him your public SSH key. Note
  47. that anyone can do that, gain access and vandalize the wiki. fr33domlover has
  48. faith in humanity, but it may still be a good idea to send the key in a GPG
  49. signed e-mail. If you have good intentions (and you do), it should be quick
  50. and easy :-)
  51. 3. Get an SFTP client program, connect to Partager's server and have fun.
  52. If you have the OpenSSH client (which is very likely, if you already used the
  53. `ssh` command once), you should also have the accompanying SFTP client program,
  54. `sftp`. You need to connect as the `wikiftp` user, in the same way you connect
  55. as the `git` user when pushing to git repositories. One simple command connects
  56. you to the server:
  57. $ sftp wikiftp@partager.null
  58. If you want to go straight to the wiki section, these work too:
  59. $ sftp wikiftp@partager.null:wiki
  60. $ sftp wikiftp@partager.null:wiki/people/joe
  61. On the first time, you'll be asked to verify the server's fingerprint. There are
  62. 2 commons ways to do that: DNS (using SSHFP records) and PGP (using Monkeysphere
  63. validation agent). I'm not a big expert but I'd suggest using the second one.
  64. Anyway neither is implemented yet. You can install Monkeysphere, but the
  65. server's key is not signed yet, so it cannot be verified this way. Until that
  66. works, you can compare the fingerprint you got with the following one. I suggest
  67. you do that after reloading this page in HTTPS.
  68. | ssh-hostkey: 1024 1e:57:72:9a:26:1f:ba:8c:cf:3e:ad:22:4d:4f:f6:9a (DSA)
  69. | 2048 2d:7f:e6:56:9b:fe:e1:3c:f9:93:c2:33:98:f5:00:1a (RSA)
  70. |_256 43:ec:87:14:30:b9:ca:9b:5e:02:f4:ca:e9:db:b4:bb (ECDSA)
  71. Major work in the SFTP underlay should be coordinated, because there is no
  72. version control. Use the wiki for that ;-)
  73. # More Information
  74. - [[!wikibooks OpenSSH/Client_Applications#The_SFTP_client]]
  75. - <http://www.phcomp.co.uk/Tutorials/Unix-And-Linux/ssh-check-server-fingerprint.htm1>
  76. - <https://www.digitalocean.com/community/tutorials/how-to-validate-ssh-server-identities-with-monkeysphere-on-an-ubuntu-vps>