{"id":156648,"date":"2020-09-18T00:41:21","date_gmt":"2020-09-17T16:41:21","guid":{"rendered":"http:\/\/4563.org\/?p=156648"},"modified":"2020-09-18T00:41:21","modified_gmt":"2020-09-17T16:41:21","slug":"debian-%e7%94%a8-sftp-%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e6%9d%83%e9%99%90%e6%b1%82%e5%8a%a9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=156648","title":{"rendered":"debian \u7528 sftp \u4e0a\u4f20\u6587\u4ef6\u6743\u9650\u6c42\u52a9"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  debian \u7528 sftp \u4e0a\u4f20\u6587\u4ef6\u6743\u9650\u6c42\u52a9               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nbweb <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        debian \u9ed8\u8ba4\u5185\u7f6e\u7684 sftp\uff0c\u6bcf\u6b21\u901a\u8fc7 sftp \u4e0a\u4f20\u6587\u4ef6\uff0c\u90fd\u662f 666 \u6743\u9650\uff0c\u627e\u4e86\u597d\u4e45\uff0c\u4e5f\u4e0d\u77e5\u9053\u5728\u54ea\u8bbe\u7f6e\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u7ecf\u5e38\u7528 ssh \u7684 sftp \u4e0a\u4f20\u6587\u4ef6\u5230\u5171\u4eab\u76ee\u5f55\uff0c\u603b\u662f 666 \u6743\u9650\uff0c\u5bfc\u81f4 win \u4e0b\u9762\u65e0\u6cd5\u6253\u5f00\uff0c\u6bcf\u6b21\u90fd\u662f\u4ece samba \u5171\u4eab\u590d\u5236\u5230 win \u4e0a\u9762\uff0c\u6216\u8005 ssh \u4e0a\u53bb chmod -R 777 \/mnt \u624d\u884c\u3002<\/p>\n<p>\u54ea\u4f4d\u5927\u4f6c\u6307\u5bfc\u4e00\u4e0b\uff0c\u5982\u4f55\u8bbe\u7f6e\uff0c\u80fd\u8ba9 sftp \u7684 root \u7528\u6237\uff0c\u4e0a\u4f20\u6587\u6863\u662f 777 \uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3264960\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mgrddsj <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u641c\u7d22\u4e86\u4e00\u4e0b\uff0c\u4f3c\u4e4e\u5927\u591a\u6570 SFTP \u5ba2\u6237\u7aef\u90fd\u652f\u6301\u6307\u5b9a\u4e0a\u4f20\u6587\u4ef6\u65f6\u6240\u7528\u7684\u6743\u9650\u3002\u6211\u81ea\u5df1\u6bd4\u8f83\u5e38\u7528\u7684 SSH+SFTP \u5ba2\u6237\u7aef\u662f Bitvise SSH Client\uff0c\u662f\u53ef\u4ee5\u6307\u5b9a\u6743\u9650\u7684\u3002\u4f46\u662f FileZilla \u4f3c\u4e4e\u5e76\u4e0d\u652f\u6301\uff0c\u53ea\u80fd\u4e0a\u4f20\u5b8c\u4e4b\u540e\u53f3\u952e\u4e0a\u4f20\u4e86\u7684\u6587\u4ef6\uff0c\u7136\u540e\u624b\u52a8\u8bbe\u7f6e\u6743\u9650\u3002<br \/>https:\/\/serverfault.com\/questions\/283492\/how-to-specify-file-permission-when-putting-a-file-using-openssh-sftp-command<\/p>\n<p>\u5982\u679c\u975e\u8981\u5728\u670d\u52a1\u7aef\u627e\u529e\u6cd5\u7684\u8bdd\uff0c\u4f3c\u4e4e\u6ca1\u529e\u6cd5\u89e3\u51b3\u3002\u56e0\u4e3a Debian \u5185\u7f6e\u7684\u662f OpenSSH (\u5927\u591a\u6570\u5730\u65b9\u4e5f\u90fd\u662f\u7528\u8fd9\u4e2a\u4f5c\u4e3a SFTP Server)\uff0c\u67e5\u4e86\u4e00\u4e0b\uff0c\u66f4\u6539\u4e0a\u4f20\u7684\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650\u53ef\u4ee5\u901a\u8fc7\u5728 \/etc\/sshd_config \u91cc Subsystem sftp \/usr\/lib\/openssh\/sftp-server -u *umask_value \u6765\u8bbe\u7f6e\u3002\u4f46\u662f umask \u6700\u4f4e\u662f 0000\uff0c\u4e5f\u5c31\u662f\u65b0\u5efa\u6587\u4ef6\u4e3a 666\uff0c\u6587\u4ef6\u5939\u4e3a 777 \u3002\u6240\u4ee5\u65e0\u89e3\u3002<\/p>\n<p>\u6216\u8005\u4e0d\u5927\u4f18\u96c5\u89e3\u51b3\u529e\u6cd5\u5c31\u662f\u5728\u670d\u52a1\u7aef\u8bbe\u7f6e cron \u4efb\u52a1\uff0c\u6bcf\u51e0\u5206\u949f\u6267\u884c\u4e00\u6b21 chmod \u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3264961\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nbweb <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mgrddsj \u54c8\u54c8\u54c8\u3002\u3002\u6211\u5c31\u662f\u7528\u7684 bitvise\uff0c\u7ecf\u5e38\u5728\u516c\u53f8\u5411\u5bb6\u91cc\u7684\u5171\u4eab\u76ee\u5f55\u4f20\u4e1c\u897f\uff0c\u6240\u4ee5\u6743\u9650\u8bbe\u7f6e\u4e0d\u597d\u3002\u6211\u73b0\u5728\u7528\u4e2a\u7b28\u65b9\u6cd5\uff0c\u7528 crontab \u6bcf\u5929\u5b9a\u65f6 chmoe -R 777 \/mnt                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3264962\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nbweb <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mgrddsj \u8bf7\u6559\u4e00\u4e0b\uff0cbitvise \u91cc\u9762\u7684 sftp\uff0c\u5982\u4f55\u8bbe\u7f6e\u4e0a\u4f20\u6743\u9650\uff1f\u8c22\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3264963\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mgrddsj <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728\u914d\u7f6e\u6587\u4ef6\u7684 SFTP tab \u90a3\u91cc\u5c31\u53ef\u4ee5\u8bbe\u7f6e\u4e86\u3002<br \/>https:\/\/imgchr.com\/i\/wt8llR                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3264964\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nbweb <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mgrddsj \u975e\u5e38\u611f\u8c22\uff01\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>debian \u7528 sftp \u4e0a\u4f20\u6587&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156648"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=156648"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156648\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156648"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}