{"id":2158,"date":"2018-10-04T07:52:45","date_gmt":"2018-10-03T22:52:45","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2158"},"modified":"2018-10-22T08:59:34","modified_gmt":"2018-10-21T23:59:34","slug":"try-dbxfs-to-fuse-mount-dropbox-on-macos-linux","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2018\/10\/04\/try-dbxfs-to-fuse-mount-dropbox-on-macos-linux\/","title":{"rendered":"macOS, Linux \u3067 Dropbox \u3092 fuse mount \u3059\u308b dbxfs \u3092\u5c11\u3057\u8a66\u3059"},"content":{"rendered":"<div id=\"__asciidoctor-preview-1__\" class=\"paragraph\">\n<p>Dropbox \u3092 FUSE mount \u51fa\u6765\u308b dbxfs \u3068\u3044\u3046\u3082\u306e\u3092\u898b\u3064\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-2__\" class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/github.com\/rianhunter\/dbxfs\">rianhunter\/dbxfs: A Dropbox-backed file system<\/a><\/li>\n<\/ul>\n<\/div>\n<div id=\"__asciidoctor-preview-3__\" class=\"paragraph\">\n<p>Doropbox \u306e Linux client \u306f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304cext4\u306e\u307f\u3068\u5236\u9650\u3055\u308c\u307e\u3059\uff0edbxfs \u3067\u3042\u308c\u3070\u304a\u305d\u3089\u304f\u3053\u306e\u5236\u9650\u3082\u554f\u984c\u306a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\uff0e(\u672a\u78ba\u8a8d)<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-4__\" class=\"quoteblock\">\n<div class=\"title\"><a href=\"https:\/\/www.dropbox.com\/en\/help\/desktop-web\/system-requirements\">What are the system requirements to run Dropbox? \u2013 Dropbox Help<\/a><\/div>\n<blockquote>\n<div id=\"__asciidoctor-preview-5__\" class=\"paragraph\">\n<p>The Dropbox folder will need to be on an ext4-formatted hard drive or partition<br \/>\nNote: ecryptfs is not supported, but Dropbox will continue to sync with supported file systems that are encrypted via full disk encryption (e.g. LUKS)<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div id=\"__asciidoctor-preview-6__\" class=\"listingblock\">\n<div class=\"title\">\u5c0e\u5165<\/div>\n<div class=\"content\">\n<pre>$ sudo apt install libfuse2 python3-pip<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-7__\" class=\"listingblock\">\n<div class=\"title\">help<\/div>\n<div class=\"content\">\n<pre>$ ~\/.local\/bin\/dbxfs -h\r\nusage: dbxfs [-h] [-f] [-v] [-s] [-n] [-l SMB_LISTEN_ADDRESS] [-c CONFIG_FILE]\r\n\t\t\t [-e ENCRYPTED_FOLDERS] [--print-default-config-file]\r\n\t\t\t [mount_point]\r\n\r\npositional arguments:\r\n  mount_point\r\n\r\noptional arguments:\r\n  -h, --help            show this help message and exit\r\n  -f, --foreground      keep filesystem server in foreground\r\n  -v, --verbose         show log messages, use twice for maximum verbosity\r\n  -s, --smb             force mounting via SMB\r\n  -n, --smb-no-mount    export filesystem via SMB but don't mount it\r\n  -l SMB_LISTEN_ADDRESS, --smb-listen-address SMB_LISTEN_ADDRESS\r\n\t\t\t\t\t\taddress that SMB service should listen on, append\r\n\t\t\t\t\t\tcolon to specify port\r\n  -c CONFIG_FILE, --config-file CONFIG_FILE\r\n\t\t\t\t\t\tconfig file path\r\n  -e ENCRYPTED_FOLDERS, --encrypted-folder ENCRYPTED_FOLDERS\r\n\t\t\t\t\t\trelative paths of encrypted folders, can be used\r\n\t\t\t\t\t\tmultiple times. requires safefs\r\n  --print-default-config-file\r\n\t\t\t\t\t\tprint default config file path to standard out and\r\n\t\t\t\t\t\tquit<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-8__\" class=\"listingblock\">\n<div class=\"title\">\u521d\u56demount<\/div>\n<div class=\"content\">\n<pre>$ ~\/.local\/bin\/dbxfs ~\/fuse\/dbxfs\r\nWe need an access token. Perform the following steps:\r\n1. Go to https:\/\/www.dropbox.com\/oauth2\/authorize?response_type=code&amp;client_id=vinkudorurc8kno\r\n2. Click \"Allow\" (you may have to log in first)\r\n3. Copy the authorization code.\r\nEnter authoritization code (Ctrl-C to quit): NodigIOndefkiwitshOrackazEuweavirtyedCibEdI\r\nWe're all connected. Do you want to save your credentials for future runs? [Y\/n] Y\r\nWould you like to help us improve dbxfs by providing anonymous error reports? [Y\/n] Y\r\nMount point \"\/home\/matoken\/fuse\/dbxfs\" doesn't exist, do you want to create it? [Y\/n] Y<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-9__\" class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>\u306eurl \u3092\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u3044\u3066\u8a8d\u8a3c\u3092\u884c\u3046<br \/>\n\u8a8d\u8a3c\u5f8c\u306e\u753b\u9762\u3067 cli-dbxfs \u306e\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3059\u308b\uff0e<\/li>\n<\/ol>\n<\/div>\n<div id=\"__asciidoctor-preview-10__\" class=\"paragraph\">\n<p><a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/45084023501\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1954\/45084023501_7cfd7c4058.jpg?atomcache=1538607066794\" alt=\"45084023501 7cfd7c4058\" \/><\/span><\/a><\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-11__\" class=\"paragraph\">\n<p>\u8a31\u53ef\u5f8c\u306b\u8868\u793a\u3055\u308c\u308b\u30c8\u30fc\u30af\u30f3\u3092 3. \u306e\u5f8c\u308d\u306b\u30b3\u30d4\u30fc&amp;\u30da\u30fc\u30b9\u30c8\u3059\u308b\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-12__\" class=\"ulist\">\n<ul>\n<li>We\u2019re all connected. Do you want to save your credentials for future runs?<br \/>\n\u6b21\u56de\u4ee5\u964d\u306e\u305f\u3081\u306b\u8cc7\u683c\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u304b?<\/li>\n<li>Would you like to help us improve dbxfs by providing anonymous error reports?<br \/>\n\u533f\u540d\u306e\u30a8\u30e9\u30fc\u5831\u544a\u3092\u884c\u3044dbxfs\u306b\u6539\u5584\u306e\u652f\u63f4\u3092\u884c\u3046\u304b?<\/li>\n<li>Mount point &#8220;\/home\/matoken\/fuse\/dbxfs&#8221; doesn\u2019t exist, do you want to create it?<br \/>\n\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044\u306e\u3067\u4f5c\u6210\u3059\u308b\u304b?<\/li>\n<\/ul>\n<\/div>\n<div id=\"__asciidoctor-preview-13__\" class=\"listingblock\">\n<div class=\"title\">\u30de\u30a6\u30f3\u30c8\u78ba\u8a8d<\/div>\n<div class=\"content\">\n<pre>$ ls ~\/fuse\/dbxfs\/<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-14__\" class=\"listingblock\">\n<div class=\"title\">\u30a2\u30f3\u30de\u30a6\u30f3\u30c8\u3059\u308b<\/div>\n<div class=\"content\">\n<pre>$ fusermount -u ~\/fuse\/dbxfs<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-15__\" class=\"listingblock\">\n<div class=\"title\">\u8cc7\u683c\u60c5\u5831\u3092\u4fdd\u5b58\u3057\u3066\u3044\u305f\u5834\u54082\u56de\u76ee\u4ee5\u964d\u306e\u30de\u30a6\u30f3\u30c8\u306f\u4f55\u3082\u805e\u304b\u308c\u306a\u3044<\/div>\n<div class=\"content\">\n<pre>$ ~\/.local\/bin\/dbxfs ~\/fuse\/dbxfs<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-16__\" class=\"paragraph\">\n<p>.<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-17__\" class=\"admonitionblock note\">\n<table  class=\" table table-hover\" >\n<tbody>\n<tr>\n<td class=\"icon\"><\/td>\n<td class=\"content\">\n<div class=\"paragraph\">\n<div class=\"paragraph\">\n<p>\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092pgp\u30d5\u30a1\u30a4\u30eb\u306b\u683c\u7d0d\u3059\u308b\u3053\u3068\u3082\u51fa\u6765\u308b\u3088\u3046\u3060\u304c\u624b\u5143\u306e\u74b0\u5883\u3067\u306f\u672a\u3060\u3046\u307e\u304f\u884c\u3063\u3066\u3044\u306a\u3044(\u591a\u5206\u4f55\u304b\u52d8\u9055\u3044\u3092\u3057\u3066\u3044\u308b)<\/p>\n<p><strong>EDIT: \u3084\u306f\u308a\u4f7f\u3044\u65b9\u304c\u9593\u9055\u3063\u3066\u3044\u305f\uff0e\u6b21\u306e\u8a18\u4e8b\u306b\u66f8\u3044\u305f -&gt;\u00a0<a href=\"https:\/\/matoken.org\/blog\/2018\/10\/05\/fuse-mount-dropbox-encrypt-dbxfs-access-token-with-gpg\/\">Dropbox \u3092 FUSE mount \u3059\u308b dbxfs \u306e\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092 gpg \u3067\u6697\u53f7\u5316\u3059\u308b \u2013 matoken&#8217;s meme<\/a><\/strong><\/p>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-19__\" class=\"listingblock\">\n<div class=\"title\">\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u78ba\u8a8d<\/div>\n<div class=\"content\">\n<pre>$ ~\/.local\/bin\/dbxfs --print-default-config-file\r\n\/home\/matoken\/.config\/dbxfs\/config.json<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-20__\" class=\"listingblock\">\n<div class=\"title\">\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092pgp\u30d5\u30a1\u30a4\u30eb\u306b\u3059\u308b<\/div>\n<div class=\"content\">\n<pre>$ jq . \/home\/matoken\/.config\/dbxfs\/config.json\r\n{\r\n  \"keyring_user\": \"yigwulbaf6shnutugaivkilj\",\r\n  \"send_error_reports\": true,\r\n  \"asked_send_error_reports\": true\r\n}\r\n$ gpg -r EAA13B982D937827 -e \/home\/matoken\/.config\/dbxfs\/config.json\r\n$ ls -l \/home\/matoken\/.config\/dbxfs\/config.json*\r\n-rw-r--r-- 1 matoken matoken 115 10\u6708  4 07:19 \/home\/matoken\/.config\/dbxfs\/config.json\r\n-rw-r--r-- 1 matoken matoken 685 10\u6708  4 07:22 \/home\/matoken\/.config\/dbxfs\/config.json.gpg\r\n$ shred \/home\/matoken\/.config\/dbxfs\/config.json\r\n$ echo '\"access_token_command\": [\"gpg\", \"--decrypt\", \"\/home\/matoken\/.config\/dbxfs\/config.json.gpg\"]' &gt; \/home\/matoken\/.config\/dbxfs\/config.json<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-21__\" class=\"listingblock\">\n<div class=\"title\">\u30de\u30a6\u30f3\u30c8<\/div>\n<div class=\"content\">\n<pre>$ ~\/.local\/bin\/dbxfs ~\/fuse\/dbxfs\r\nRunning 'gpg --decrypt \/home\/matoken\/.config\/dbxfs\/config.json.gpg' for access token\r\ngpg: 4096-\u30d3\u30c3\u30c8RSA\u9375, ID EAA13B982D937827, \u65e5\u4ed82015-06-11\u306b\u6697\u53f7\u5316\u3055\u308c\u307e\u3057\u305f\r\n      \"K.I.Matohara &lt;matoken@gmail.com&gt;\"\r\nTraceback (most recent call last):\r\n  File \"\/home\/matoken\/.local\/bin\/dbxfs\", line 11, in &lt;module&gt;\r\n    sys.exit(main())\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/dbxfs\/main.py\", line 212, in main\r\n    dropbox.Dropbox(access_token).users_get_current_account()\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/dropbox\/base.py\", line 4245, in users_get_current_account\r\n    None,\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/dropbox\/dropbox.py\", line 274, in request\r\n    timeout=timeout)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/dropbox\/dropbox.py\", line 365, in request_json_string_with_retry\r\n    timeout=timeout)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/dropbox\/dropbox.py\", line 449, in request_json_string\r\n    timeout=timeout,\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/sessions.py\", line 559, in post\r\n    return self.request('POST', url, data=data, json=json, **kwargs)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/sessions.py\", line 498, in request\r\n    prep = self.prepare_request(req)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/sessions.py\", line 441, in prepare_request\r\n    hooks=merge_hooks(request.hooks, self.hooks),\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/models.py\", line 310, in prepare\r\n    self.prepare_headers(headers)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/models.py\", line 444, in prepare_headers\r\n    check_header_validity(header)\r\n  File \"\/home\/matoken\/.local\/lib\/python3.6\/site-packages\/requests\/utils.py\", line 941, in check_header_validity\r\n    raise InvalidHeader(\"Invalid return character or leading space in header: %s\" % name)\r\nrequests.exceptions.InvalidHeader: Invalid return character or leading space in header: Authorization<\/pre>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div id=\"__asciidoctor-preview-22__\" class=\"paragraph\">\n<p>\u6301\u3061\u904b\u3073\u30e2\u30d0\u30a4\u30ebPC\u3060\u3068\u8f9b\u3044\u3067\u3057\u3087\u3046\u304c\uff0c\u636e\u3048\u7f6e\u304d\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u74b0\u5883\u306a\u3069\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u306e\u30de\u30b7\u30f3\u3067\u306f\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-23__\" class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ grep ^Version: ~\/.local\/lib\/python3.6\/site-packages\/dbxfs-1.0.4.dist-info\/METADATA\r\nVersion: 1.0.4\r\n$ dpkg-query -W libfuse2 python3-pip\r\nlibfuse2:amd64  2.9.8-2\r\npython3-pip     9.0.1-2.3\r\n$ lsb_release -d\r\nDescription:    Debian GNU\/Linux unstable (sid)\r\n$ uname -m\r\nx86_64<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Dropbox \u3092 FUSE mount \u51fa\u6765\u308b dbxfs \u3068\u3044\u3046\u3082\u306e\u3092\u898b\u3064\u3051\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e rianhunter\/dbxfs: A Dropbox-backed file system Doropbox \u306e  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6,199],"tags":[419,417,418],"class_list":["post-2158","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-dbxfs","tag-dropbox","tag-fuse"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2158"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2158\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}