{"id":1364,"date":"2014-03-15T08:31:06","date_gmt":"2014-03-14T23:31:06","guid":{"rendered":"http:\/\/www.white-room.jp\/blog\/?p=1364"},"modified":"2014-03-17T01:10:37","modified_gmt":"2014-03-16T16:10:37","slug":"proftpd-sftp%e5%8c%96%e3%82%81%e3%82%82%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.white-room.jp\/blog\/?p=1364","title":{"rendered":"proftpd sftp\u5316\u3081\u3082\u3002"},"content":{"rendered":"<p>proftpd ubuntu12.04\u6a19\u6e96\u3002<\/p>\n<p>\u8a8d\u8a3c\u306fauth_file.c\u3067\u30d0\u30fc\u30c1\u30e3\u30eb\u30e6\u30fc\u30b6\u306e\u307f\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u306e\u5229\u7528\u76ee\u7684\u306f\u3001web\u30b5\u30a4\u30c8\u66f4\u65b0<\/p>\n<pre><code>\r\n\/etc\/proftpd\/proftpd.conf\r\n#sftp\u3067welcome.msg\u3092\u63a2\u305b\u306a\u304f\u306a\u308b\u306e\u3092\u76f4\u3059\u306e\u304c\u9762\u5012\u304f\u3055\u3044\u306e\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\n- DisplayLogin                    welcome.msg\r\n+ # DisplayLogin                    welcome.msg\r\n# \u30d5\u30a1\u30a4\u30eb\u540d\u5909\u66f4\u3067\u8aad\u307f\u8fbc\u307e\u305b\u305f\u308a\u3001\u6b62\u3081\u305f\u308a\r\n- Include \/etc\/proftpd\/conf.d\/\r\n+ Include \/etc\/proftpd\/conf.d\/*.conf\r\n<\/code><\/pre>\n<pre><code>\r\n\/etc\/proftpd\/conf.d\/sftp.conf\r\n\r\n&lt;Limit Login>\r\n    order allow,deny\r\n    allow from 127.0.0.1 #wordpress\u306e\u81ea\u52d5\u66f4\u65b0\u3068\u304b\u306e\u305f\u3081\u306blocalhost\u3060\u3051\u7d20\u306eFTP\u8a31\u53ef\u3002\r\n    DenyAll\r\n&lt;\/Limit>\r\n\r\n &lt;IfModule mod_sftp.c>\r\n    &lt;VirtualHost xxx.xxx.xxx.xxx> #proftpd \u306fip\u30a2\u30c9\u30ec\u30b9\u306e\u307f\u306a\u306e\u3067\u3001ifconfig\u3067\u51fa\u308b\u3084\u3064\u3092\u5165\u308c\u308b\r\n        &lt;Limit login>\r\n           AllowAll\u3000#sftp\u306f\u3069\u3053\u304b\u3089\u3067\u3082\u8a31\u53ef\u3002\u5236\u9650\u306fiptables\u307e\u304b\u305b\u3002\r\n        &lt;\/Limit>\r\n        SFTPEngine              on\r\n        port                    2222 #ssh\u3068\u5206\u3051\u308b\u305f\u3081\u3001\u304a\u597d\u307f\u306e\u7a7a\u3044\u3066\u308b\u30dd\u30fc\u30c8\u3067\u958b\u3051\u3066\u308b\u30dd\u30fc\u30c8\u3002sftp\u306e\u307f\u306b\u3059\u308b\u306a\u3089\u3001\u5143\u3005\u958b\u3051\u3066\u3042\u308b21\u306b\u3059\u308b\u3068\u697d\u304b\u3082\u3002\r\n        DefaultRoot             ~\/\u3000\u3000#\u30c7\u30d5\u30a9\u30eb\u30c8\u30eb\u30fc\u30c8\u306fsftp\u3067\u3082\u52b9\u304f\u306e\u3067\u3079\u3093\u308a\r\n        AllowOverwrite          on\r\n        SFTPLog                 \/var\/log\/proftpd\/sftp.log\u3000#log\u53d6\u308b\r\n        SFTPHostKey             \/etc\/ssh\/ssh_host_dsa_key\u3000#ssh\u306ehostkey\u3002\u4e0b\u3082\r\n        SFTPHostKey             \/etc\/ssh\/ssh_host_rsa_key\r\n        SFTPAuthorizedUserKeys  file:\/path\/to\/keyfile\/%u #%u\u306f\u30e6\u30fc\u30b6\u540d\u306b\u5c55\u958b\u3055\u308c\u308b\u306e\u3067\u3001\u30e6\u30fc\u30b6\u306e\u516c\u958b\u9375\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u30e6\u30fc\u30b6\u540d\u306b\r\n        SFTPAuthMethods         publickey password\u3000#\u9375\u304c\u306a\u3051\u308c\u3070\u30d1\u30b9\u30ef\u30fc\u30c9\r\n        AuthUserFile        \/path\/to\/virtual\/user\/proftpd_userfile #\u30d0\u30fc\u30c1\u30e3\u30eb\u30e6\u30fc\u30b6\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002\r\n        AuthGroupFile       \/path\/to\/virtual\/user\/proftpd_groupfile\r\n    &lt;\/VirtualHost>\r\n&lt;\/IfModule>\r\n<\/code><\/pre>\n<p>inetd,xinetd\u7d4c\u7531\u306a\u3089\u3001\u6b21\u306e\u63a5\u7d9a\u304b\u3089\u3002standalone\u306a\u3089\u518d\u8d77\u52d5\u3002<\/p>\n<h4>\u9375\u5f62\u5f0f\u306b\u3064\u3044\u3066<\/h4>\n<p>proftpd\u306emod_sftp.c\u304c\u8aad\u3081\u308b\u306e\u306f\u3001RFC 4716\u5f62\u5f0f\u306e\u307f\u3002<\/p>\n<p>linux\u3067\u4e00\u822c\u7684\u306a\u3001openssh\u5f62\u5f0f\u306e\u307e\u307e\u3067\u306f\u8aad\u3081\u306a\u3044\u306e\u3067\u3001\u5909\u63db\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002<\/p>\n<p>\u516c\u5f0f\u3092\u8aad\u307e\u306a\u3044\u3068\u30cf\u30de\u308a\u304c\u3061\u306a\u3068\u3053\u308d\u3002<\/p>\n<h4>\u9375\u7f6e\u304d\u5834\u306b\u3064\u3044\u3066\u3002<\/h4>\n<p>\u516c\u958b\u9375\u304c\u306a\u3051\u308c\u3070FTP\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u308f\u3051\u3067\u3059\u304b\u3089\u3001\u6700\u521d\u306b\u516c\u958b\u9375\u3092\u30e6\u30fc\u30b6\u304c\u81ea\u5206\u3067\u8a2d\u7f6e\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u7ba1\u7406\u8005\u304c\u30e6\u30fc\u30b6\u3092\u8ffd\u52a0\u3059\u308b\u6642\u306b\u5165\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306a ~\/.ssh\/\u516c\u958b\u9375\u30d5\u30a1\u30a4\u30eb \u306b\u7f6e\u3051\u3070\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u30e6\u30fc\u30b6\u3092\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u524a\u9664\u3059\u308b\u6642\u306b\u9375\u3054\u3068\u524a\u9664\u3067\u304d\u3066\u697d\u3002<\/p>\n<p>\u305f\u3060\u3001.ssh\u4ee5\u4e0b\u3092\u30e6\u30fc\u30b6\u306e\u6240\u6709\u306b\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u6d88\u3055\u308c\u305f\u308a\u3057\u305f\u3089\u9762\u5012\u3002\u7ba1\u7406\u8005\u306e\u6240\u6709\u306b\u3059\u308c\u3070\u3001\u7ba1\u7406\u8005\u3057\u304b\u5909\u66f4\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u7d50\u5c40\u7ba1\u7406\u8005\u304c\u7ba1\u7406\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001\u5225\u306e\u5834\u6240\u306b\u307e\u3068\u3081\u3066\u7ba1\u7406\u3059\u308b\u306e\u304c\u7121\u96e3\u304b\u3082\u3002<\/p>\n<p>\u4eca\u56de\u306fweb\u30b5\u30a4\u30c8\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306a\u306e\u3067\u3001\u30c9\u30c3\u30c8\u3082\u306e\u304c\u5897\u3048\u3066\u30a6\u30b6\u306e\u3067\u3001\u5225\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u7ba1\u7406\u3059\u308b\u306e\u304c\u4fbf\u5229\u3002<\/p>\n<h4>\u9375\u304b\u30d1\u30b9\u30ef\u30fc\u30c9\u304b<\/h4>\n<p>\u9375\u8a8d\u8a3c\u6700\u5f37\u4f1d\u8aac\u3082\u3001\u79d8\u5bc6\u9375\u304c\u624b\u306b\u5165\u308c\u3070\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306a\u3057\u306a\u3089\u77ac\u6bba\u3002\u77ed\u3044\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306a\u3089\u79d2\u6bba\u3002\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u7684\u306a\u3082\u306e\u306b\u4fdd\u5b58\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u6642\u306b\u81ea\u52d5\u89e3\u9320\u3060\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u30ed\u30b0\u30a4\u30f3\u3055\u308c\u305f\u3089\u77ac\u6bba\u3002<\/p>\n<p>\u9375\u30d5\u30a1\u30a4\u30eb\u3092\u76d7\u307e\u308c\u308b\u30ea\u30b9\u30af\u3068\u3001\u8d85\u9577\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30e1\u30e2\uff08\u3055\u3059\u304c\u306b\u899a\u3048\u304d\u308c\u306a\u3044w\uff09\u3092\u76d7\u307e\u308c\u308b\u30ea\u30b9\u30af\u3002\u8d85\u9577\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u30a2\u30bf\u30c3\u30af\u3067\u629c\u3051\u3089\u308c\u308b\u30ea\u30b9\u30af\u3092\u8003\u3048\u308b\u3068\u3001\u5b89\u5168\u6027\u306f\u3069\u308c\u3082\u5927\u5dee\u306a\u3044\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n<p>\u9375\u8a8d\u8a3c\u306f\u9375\u7ba1\u7406\u3082\u3042\u308b\u3057\u3001\u62c5\u5f53\u8005\u304c\u5909\u308f\u3063\u305f\u6642\u3082\u73fe\u72b6\u306e\u8a2d\u5b9a\u5909\u66f4\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u305d\u306e\u307e\u307e\u4f7f\u3048\u3066\u5909\u66f4\u304c\u697d\u3060\u3057\u3001\u9375\u8a8d\u8a3c\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u3068\u9375\u7ba1\u7406\u306e\u8aac\u660e\u3092\u3059\u308b\u624b\u9593\u3082\u7701\u3051\u308b\u306e\u3067\u3001\u8d85\u9577\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u30e1\u30a4\u30f3\u3067\u884c\u304f\u3053\u3068\u306b\u3002<\/p>\n<p>\u203bssh\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u304c\u9375\u8a8d\u8a3c\u9650\u5b9a\u306b\u306a\u3063\u3066\u3044\u3066\u3082\u3001proftpd\u306esftp\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u306b\u306f\u5f71\u97ff\u3057\u306a\u3044\u3002<\/p>\n<h4>\u901f\u5ea6<\/h4>\n<p>1000baseT\u306eLAN\u5185\u3067\u3001\u7d20\u306eFTP\u306b\u6bd4\u3079\u308b\u3068\u304a\u304a\u3080\u306d\u534a\u5206\u304f\u3089\u3044\u306e\u901f\u5ea6\u3057\u304b\u51fa\u307e\u305b\u3093\u304c\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u8d8a\u3057\u3060\u3068\u3001\u63a5\u7d9a\u74b0\u5883\u306b\u3088\u3063\u3066\u306f\u307b\u3068\u3093\u3069\u5909\u308f\u3089\u306a\u3044\u304b\u3082\u3002<\/p>\n<h4><a name=\"error\">Error?<\/a><\/h4>\n<pre><code>requested read offset (32768 bytes) greater than size of 'file name' (10399 bytes)<\/code><\/pre>\n<p>\/var\/log\/proftpd\/sftp.log\u306b\u3053\u306e\u3088\u3046\u306a\u30ed\u30b0\u304c\u5927\u91cf\u306b\u2026\u2026\u3002<\/p>\n<p>\u30b0\u30b0\u308a\u5012\u3057\u3066\u307f\u305f\u3089\u3001\u3069\u3046\u3082\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u306e\u76f8\u6027\u554f\u984c\u3089\u3057\u3044\u3002<\/p>\n<p>\u305f\u3081\u3057\u306b\u3001proftpd\u306e\u30ea\u30ea\u30fc\u30b9\u5019\u88dc\u7248\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5165\u308c\u3066\u307f\u3066\u3082\u540c\u3058\u6319\u52d5\u3092\u793a\u3059\u306e\u3067\u3001proftpd\u5074\u306e\u554f\u984c\u3067\u306f\u306a\u3055\u305d\u3046\u3002<\/p>\n<p>\u5927\u5c0f\u30d5\u30a1\u30a4\u30eb\u3092\u4e0a\u3052\u4e0b\u3052\u3057\u3066\u3082\u3001\u7279\u306b\u554f\u984c\u306f\u51fa\u306a\u3044\u306e\u3067\u3001\u6c17\u306b\u3057\u306a\u3044\u65b9\u5411\u3067\u3088\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u66f4\u306b\u30b0\u30b0\u308a\u5012\u3057\u3066\u307f\u305f\u3089\u3001\u30a6\u30b6\u30a4\u306a\u3089\/dev\/null\u306b\u6368\u3066\u3066\u3057\u307e\u3048w\u3068\u66f8\u3044\u3066\u3042\u3063\u305f\u308a\u3059\u308b\u3002<\/p>\n<p>\u5410\u304d\u51fa\u3055\u305b\u7d9a\u3051\u308b\u3068\u30a2\u30db\u307f\u305f\u3044\u306b\u5de8\u5927\u306a\u30ed\u30b0\u3092\u5410\u304f\u306e\u3067\u3001<\/p>\n<pre><code>SFTPLog \/dev\/null\u3000#log\u6368\u3066\u308b<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3044\u304f\u3053\u3068\u306b\u3002<\/p>\n<h4>\u6b8b\u308b\u554f\u984c<\/h4>\n<p>cyberduck\u306esftp\u5bfe\u5fdc\u306f\u3001openssh sftp\u304c\u524d\u63d0\u306a\u306e\u304b\u3001proftpd\u7d4c\u7531\u3060\u3068\u6319\u52d5\u304c\u304a\u304b\u3057\u3044\u3002<\/p>\n<p>firefoxOSX\u7248\u306efireftp\u3082\u6319\u52d5\u304c\u304a\u304b\u3057\u3044\u3002\u30ed\u30b0\u30a4\u30f3\u6210\u529f\u306e\u30ed\u30b0\u306f\u3067\u308b\u3051\u3069\u3001\u30d5\u30a1\u30a4\u30eb\u30ea\u30b9\u30c8\u304c\u51fa\u3066\u3053\u306a\u3044\u3002<\/p>\n<p>Filezilla\u306f\u4e0a\u4e0b\u3068\u3082\u554f\u984c\u306a\u3057\u3060\u3051\u3069\u3001<a href=\"#error\">\u3053\u306e\u554f\u984c<\/a>\u304c\u51fa\u308b\u3002\u3051\u3069\u6c17\u306b\u3057\u306a\u3044w<\/p>\n<h4>mod_delay\u30e1\u30e2<\/h4>\n<p>proftpd\u3067\u63a5\u7d9a\u6642\u306e\u8fd4\u7b54\u304c\u9045\u3044\u3053\u3068\u304c\u3042\u308b\u306e\u306f\u3001mod_delay\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3089\u3002<\/p>\n<p>\u4f55\u5ea6\u3082\u30b0\u30b0\u3063\u305f\u6c17\u304c\u3059\u308b\u2026\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>proftpd ubuntu12.04\u6a19\u6e96\u3002 \u8a8d\u8a3c\u306fauth_file.c\u3067\u30d0\u30fc\u30c1\u30e3\u30eb\u30e6\u30fc\u30b6\u306e\u307f\u3002 \u30e6\u30fc\u30b6\u306e\u5229\u7528\u76ee\u7684\u306f\u3001web\u30b5\u30a4\u30c8\u66f4\u65b0 \/etc\/proftpd\/proftpd.conf #sftp\u3067welcome.m [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1364","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1364"}],"version-history":[{"count":1,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions"}],"predecessor-version":[{"id":1373,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions\/1373"}],"wp:attachment":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}