{"id":34885,"date":"2024-08-16T11:07:48","date_gmt":"2024-08-16T04:07:48","guid":{"rendered":"http:\/\/jupitek.maudemo.vip\/index.php\/2024\/08\/16\/access-your-box-com-account-from-your-linode\/"},"modified":"2024-08-16T11:07:48","modified_gmt":"2024-08-16T04:07:48","slug":"access-your-box-com-account-from-your-linode","status":"publish","type":"post","link":"https:\/\/jupitek.maudemo.vip\/index.php\/2024\/08\/16\/access-your-box-com-account-from-your-linode\/","title":{"rendered":"Truy c\u1eadp t\u00e0i kho\u1ea3n Box.com c\u1ee7a b\u1ea1n t\u1eeb Linode"},"content":{"rendered":"<p>N\u1ebfu b\u1ea1n \u0111\u00e3 kh\u00e1m ph\u00e1 ra&nbsp;<a href=\"https:\/\/www.box.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Box<\/a>&nbsp;th\u00ec b\u1ea1n bi\u1ebft r\u1eb1ng n\u00f3 c\u00f3 th\u1ec3 l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 tuy\u1ec7t v\u1eddi \u0111\u1ec3 l\u01b0u tr\u1eef, di chuy\u1ec3n v\u00e0 qu\u1ea3n l\u00fd t\u1ec7p. H\u01b0\u1edbng d\u1eabn sau \u0111\u00e2y gi\u00fap b\u1ea1n c\u00e0i \u0111\u1eb7t v\u00e0 c\u1ea5u h\u00ecnh m\u1ed9t ph\u1ea7n m\u1ec1m mi\u1ec5n ph\u00ed gi\u00fap truy c\u1eadp Box t\u1eeb Linode c\u1ee7a b\u1ea1n d\u1ec5 d\u00e0ng h\u01a1n.<\/p>\n<h2 id=\"before-you-begin\">Tr\u01b0\u1edbc khi b\u1ea1n b\u1eaft \u0111\u1ea7u<a href=\"https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/#before-you-begin\"><\/a><\/h2>\n<ol>\n<li>N\u1ebfu b\u1ea1n ch\u01b0a th\u1ef1c hi\u1ec7n, h\u00e3y t\u1ea1o m\u1ed9t t\u00e0i kho\u1ea3n Linode v\u00e0 Compute Instance. Xem h\u01b0\u1edbng d\u1eabn&nbsp;<a href=\"https:\/\/www.linode.com\/docs\/products\/platform\/get-started\/\">B\u1eaft \u0111\u1ea7u v\u1edbi Linode<\/a>&nbsp;v\u00e0&nbsp;<a href=\"https:\/\/www.linode.com\/docs\/products\/compute\/compute-instances\/guides\/create\/\">T\u1ea1o Compute Instance<\/a>&nbsp;c\u1ee7a ch\u00fang t\u00f4i .<\/li>\n<li>L\u00e0m theo h\u01b0\u1edbng d\u1eabn&nbsp;<a href=\"https:\/\/www.linode.com\/docs\/products\/compute\/compute-instances\/guides\/set-up-and-secure\/\">Thi\u1ebft l\u1eadp v\u00e0 B\u1ea3o m\u1eadt Phi\u00ean b\u1ea3n Compute<\/a>&nbsp;c\u1ee7a ch\u00fang t\u00f4i \u0111\u1ec3 c\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n. B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 mu\u1ed1n \u0111\u1eb7t m\u00fai gi\u1edd, c\u1ea5u h\u00ecnh t\u00ean m\u00e1y ch\u1ee7, t\u1ea1o t\u00e0i kho\u1ea3n ng\u01b0\u1eddi d\u00f9ng gi\u1edbi h\u1ea1n v\u00e0 t\u0103ng c\u01b0\u1eddng quy\u1ec1n truy c\u1eadp SSH.<\/li>\n<\/ol>\n<p class=\"has-background\" style=\"background-color:#74f78c33\">Ghi ch\u00fa: H\u01b0\u1edbng d\u1eabn n\u00e0y y\u00eau c\u1ea7u b\u1ea1n ph\u1ea3i c\u00f3 t\u00e0i kho\u1ea3n Box.<\/p>\n<h2 id=\"set-boxs-mount-point\">\u0110i\u1ec3m g\u1eafn k\u1ebft c\u1ee7a Set Box<a href=\"https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/#set-boxs-mount-point\"><\/a><\/h2>\n<p>B\u01b0\u1edbc ti\u1ebfp theo s\u1ebd t\u1ea1o m\u1ed9t th\u01b0 m\u1ee5c tr\u1ed1ng n\u01a1i Box s\u1ebd t\u1ed3n t\u1ea1i v\u00e0 t\u1ea5t c\u1ea3 c\u00e1c t\u1ec7p v\u00e0 th\u01b0 m\u1ee5c Box c\u1ee7a b\u1ea1n s\u1ebd xu\u1ea5t hi\u1ec7n. B\u1ea1n c\u00f3 th\u1ec3 g\u1eafn n\u00f3 \u1edf b\u1ea5t k\u1ef3 \u0111\u00e2u, nh\u01b0ng&nbsp;<code>\/home\/example_user\/box<\/code>s\u1ebd \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng cho h\u01b0\u1edbng d\u1eabn n\u00e0y.<\/p>\n<p>1.T\u1ea1o \u0111i\u1ec3m g\u1eafn k\u1ebft:<\/p>\n<pre class=\"wp-block-code\"><code><code>mkdir ~\/box <\/code><\/code><\/pre>\n<p class=\"has-background\" style=\"background-color:#74f78c33\">Ghi ch\u00fa: N\u1ebfu ch\u1ec9 b\u1ea1n&nbsp;<code>example_user<\/code>c\u1ea7n truy c\u1eadp v\u00e0o n\u1ed9i dung t\u00e0i kho\u1ea3n Box, th\u00ec t\u1ea1o \u0111i\u1ec3m g\u1eafn k\u1ebft trong&nbsp;<code>\/home<\/code>th\u01b0 m\u1ee5c c\u1ee7a ng\u01b0\u1eddi d\u00f9ng \u0111\u00f3 l\u00e0 \u0111\u01b0\u1ee3c. N\u1ebfu nhi\u1ec1u ng\u01b0\u1eddi d\u00f9ng h\u1ec7 th\u1ed1ng (ngo\u00e0i root) c\u1ea7n truy c\u1eadp v\u00e0o t\u00e0i kho\u1ea3n Box, th\u00ec \u0111i\u1ec3m g\u1eafn k\u1ebft n\u00ean \u0111\u01b0\u1ee3c \u0111\u1eb7t trong th\u01b0 m\u1ee5c h\u1ec7 th\u1ed1ng nh\u01b0&nbsp;<code>\/mnt\/box<\/code>. \u0110\u1ec3 bi\u1ebft th\u00eam th\u00f4ng tin, h\u00e3y xem&nbsp;<a href=\"http:\/\/linux.die.net\/man\/8\/mount.davfs\" target=\"_blank\" rel=\"noreferrer noopener\">trang h\u01b0\u1edbng d\u1eabn davfs<\/a>&nbsp;.<\/p>\n<p>2.Th\u00eam Box v\u00e0o fstab.T\u1ec7p fstab (ho\u1eb7c b\u1ea3ng h\u1ec7 th\u1ed1ng t\u1ec7p) l\u00e0 t\u1ec7p c\u1ea5u h\u00ecnh h\u1ec7 th\u1ed1ng th\u01b0\u1eddng th\u1ea5y t\u1ea1i&nbsp;<code>\/etc\/fstab<\/code>. T\u1ec7p n\u00e0y ch\u1ee9a th\u00f4ng tin c\u1ea7n thi\u1ebft \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng h\u00f3a qu\u00e1 tr\u00ecnh g\u1eafn k\u1ebft. Th\u00eam m\u1ee5c nh\u1eadp cho t\u00e0i kho\u1ea3n Box c\u1ee7a b\u1ea1n:<\/p>\n<pre class=\"wp-block-code\"><code>https:\/\/dav.box.com\/dav \/home\/example_user\/box davfs rw,user,noauto 0 0<\/code><\/pre>\n<h2 id=\"configure-webdav-and-user-permissions\">C\u1ea5u h\u00ecnh WebDAV v\u00e0 Quy\u1ec1n c\u1ee7a Ng\u01b0\u1eddi d\u00f9ng<a href=\"https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/#configure-webdav-and-user-permissions\"><\/a><\/h2>\n<p>1.C\u00e0i \u0111\u1eb7t davfs2, ch\u01b0\u01a1ng tr\u00ecnh ph\u1ee5 tr\u1ee3 WebDAV \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 giao ti\u1ebfp gi\u1eefa t\u00e0i kho\u1ea3n Linode v\u00e0 Box c\u1ee7a b\u1ea1n:<\/p>\n<p><strong>CentOS<\/strong><\/p>\n<pre class=\"wp-block-code\"><code><code>sudo yum install davfs2 <\/code><\/code><\/pre>\n<p><strong>Debian\/Ubuntu<\/strong><\/p>\n<pre class=\"wp-block-code\"><code><code>sudo apt-get install davfs2 <\/code><\/code><\/pre>\n<p>Khi \u0111\u01b0\u1ee3c h\u1ecfi li\u1ec7u ng\u01b0\u1eddi d\u00f9ng kh\u00f4ng c\u00f3 \u0111\u1eb7c quy\u1ec1n c\u00f3 \u0111\u01b0\u1ee3c ph\u00e9p g\u1eafn t\u00e0i nguy\u00ean WebDAV hay kh\u00f4ng, h\u00e3y ch\u1ecdn&nbsp;<code>Yes<\/code>.<\/p>\n<p><strong>Fedora<\/strong><\/p>\n<pre class=\"wp-block-code\"><code><code>sudo dnf install davfs2<\/code><\/code><\/pre>\n<p>2.C\u1ea5p cho ng\u01b0\u1eddi d\u00f9ng quy\u1ec1n g\u1eafn k\u1ebft b\u1eb1ng davfs2. Thay th\u1ebf&nbsp;<code>example_user<\/code>b\u1eb1ng t\u00ean ng\u01b0\u1eddi d\u00f9ng c\u1ee7a b\u1ea1n.<\/p>\n<pre class=\"wp-block-code\"><code><code>sudo usermod -aG davfs2 \"example_user\"<\/code><\/code><\/pre>\n<p>3.Kh\u1edfi \u0111\u1ed9ng l\u1ea1i distro c\u1ee7a b\u1ea1n. \u0110\u00e2y l\u00e0 c\u00e1ch t\u1ed1t nh\u1ea5t \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o kh\u00f4ng c\u00f3 phi\u00ean ng\u01b0\u1eddi d\u00f9ng n\u00e0o c\u00f2n m\u1edf. N\u1ebfu c\u00f3, b\u1ea1n s\u1ebd g\u1eb7p s\u1ef1 c\u1ed1 khi g\u1eafn \u1ed5 Box ngay c\u1ea3 sau khi th\u00eam ng\u01b0\u1eddi d\u00f9ng c\u1ee7a m\u00ecnh v\u00e0o nh\u00f3m ph\u00f9 h\u1ee3p.<\/p>\n<pre class=\"wp-block-code\"><code><code>sudo reboot<\/code><\/code><\/pre>\n<p>4.SSH tr\u1edf l\u1ea1i Linode c\u1ee7a b\u1ea1n.<\/p>\n<p>5.Chia s\u1ebb WebDAV do Box.com xu\u1ea5t ra kh\u00f4ng h\u1ed7 tr\u1ee3 kh\u00f3a t\u1ec7p. Do \u0111\u00f3, b\u1ea1n c\u1ea7n t\u1eaft kh\u00f3a t\u1ec7p trong t\u1ec7p c\u1ea5u h\u00ecnh davfs2. N\u1ebfu kh\u00f4ng, b\u1ea1n s\u1ebd g\u1eb7p ph\u1ea3i &#8220;L\u1ed7i \u0111\u1ea7u v\u00e0o\/\u0111\u1ea7u ra&#8221; khi c\u1ed1 g\u1eafng t\u1ea1o t\u1ec7p.<\/p>\n<pre class=\"wp-block-code\"><code><code>echo 'use_locks 0' &gt;&gt; ~\/.davfs2\/davfs2.conf<\/code><\/code><\/pre>\n<p>6.Th\u00eam th\u00f4ng tin t\u00e0i kho\u1ea3n Box c\u1ee7a b\u1ea1n v\u00e0o t\u1ec7p b\u00ed m\u1eadt c\u1ee7a WebDAV, thay th\u1ebf c\u1ea3&nbsp;<code>email<\/code>th\u00f4ng tin b\u1eb1ng \u0111\u1ecba ch\u1ec9 email b\u1ea1n s\u1eed d\u1ee5ng \u0111\u1ec3 \u0111\u0103ng nh\u1eadp v\u00e0o t\u00e0i kho\u1ea3n Box v\u00e0&nbsp;<code>password<\/code>m\u1eadt kh\u1ea9u Box c\u1ee7a b\u1ea1n.<\/p>\n<pre class=\"wp-block-code\"><code><code>echo 'https:\/\/dav.box.com\/dav email password' &gt;&gt; ~\/.davfs2\/secrets <\/code><\/code><\/pre>\n<p class=\"has-background\" style=\"background-color:#74f78c33\">Ghi ch\u00fa: N\u1ebfu m\u1eadt kh\u1ea9u c\u1ee7a b\u1ea1n ch\u1ee9a c\u00e1c k\u00fd t\u1ef1 d\u1ea5u ngo\u1eb7c k\u00e9p (&nbsp;<code>'<\/code>ho\u1eb7c&nbsp;<code>\"<\/code>), b\u1ea1n s\u1ebd c\u1ea7n ph\u1ea3i ch\u1ec9nh s\u1eeda t\u1ec7p b\u00ed m\u1eadt tr\u1ef1c ti\u1ebfp trong tr\u00ecnh so\u1ea1n th\u1ea3o v\u0103n b\u1ea3n.<\/p>\n<p>7.L\u00e0m cho&nbsp;<code>secrets<\/code>t\u1ec7p ch\u1ec9 c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c \u0111\u1ecdc b\u1edfi ch\u1ee7 s\u1edf h\u1eefu c\u1ee7a n\u00f3:<code> chmod 600 ~\/.davfs2\/secrets<\/code><\/p>\n<pre class=\"wp-block-code\"><code> chmod 600 ~\/.davfs2\/secrets\n<\/code><\/pre>\n<h2 id=\"mounting-and-unmounting-your-box-drive\">L\u1eafp v\u00e0 th\u00e1o \u1ed5 \u0111\u0129a h\u1ed9p c\u1ee7a b\u1ea1n<a href=\"https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/#mounting-and-unmounting-your-box-drive\"><\/a><\/h2>\n<p>1.\u0110\u1ec3 g\u1eafn k\u1ebft v\u00e0 thay \u0111\u1ed5i v\u00e0o th\u01b0 m\u1ee5c c\u1ee7a n\u00f3:<\/p>\n<pre class=\"wp-block-code\"><code><code>mount ~\/box<\/code><\/code><\/pre>\n<p>2.\u0110\u1ec3 th\u00e1o g\u1eafn:<\/p>\n<pre class=\"wp-block-code\"><code><code>umount ~\/box<\/code><\/code><\/pre>\n<h2 id=\"wrapping-up\">K\u1ebft th\u00fac<a href=\"https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/#wrapping-up\"><\/a><\/h2>\n<p>\u0110\u1ec3 x\u00e1c nh\u1eadn \u1ed5 Box c\u1ee7a b\u1ea1n \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1eafn k\u1ebft:<\/p>\n<pre class=\"wp-block-code\"><code>df\n<\/code><\/pre>\n<p>K\u1ebft qu\u1ea3 \u0111\u1ea7u ra s\u1ebd tr\u00f4ng t\u01b0\u01a1ng t\u1ef1 nh\u01b0 th\u1ebf n\u00e0y:<\/p>\n<pre class=\"wp-block-code\"><code>Filesystem              1K-blocks   Used Available Use% Mounted on\n\/dev\/root                 4122048 886316   3009636  23% \/\ndevtmpfs                   505636      0    505636   0% \/dev\ntmpfs                      507504      0    507504   0% \/dev\/shm\ntmpfs                      507504   1420    506084   1% \/run\ntmpfs                      507504      0    507504   0% \/sys\/fs\/cgroup\ntmpfs                      507504      0    507504   0% \/tmp\ntmpfs                      101504      0    101504   0% \/run\/user\/1000\nhttps:\/\/dav.box.com\/dav  10485756     72  10485684   1% \/home\/example_user\/box<\/code><\/pre>\n<p>\u0110\u1ec3 xem c\u00e1c t\u00f9y ch\u1ecdn g\u1eafn k\u1ebft m\u00e0 \u1ed5 Box c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c g\u1eafn k\u1ebft:<\/p>\n<pre class=\"wp-block-code\"><code>cat \/proc\/mounts | grep box\n<\/code><\/pre>\n<p>\u0110\u1ea7u ra s\u1ebd hi\u1ec3n th\u1ecb nh\u01b0 sau:<\/p>\n<pre class=\"wp-block-code\"><code>https:\/\/dav.box.com\/dav \/home\/example_user\/box fuse rw,nosuid,nodev,noexec,relatime,user_id=1000,group_id=1000,allow_other,max_read=16384 0 0\n<\/code><\/pre>\n<p>B\u1ea1n \u0111\u00e3 ho\u00e0n t\u1ea5t! Th\u01b0 m\u1ee5c&nbsp;<code>~\/box<\/code>b\u00e2y gi\u1edd s\u1ebd ph\u1ea3n \u00e1nh n\u1ed9i dung Box c\u1ee7a b\u1ea1n! L\u1ea7n \u0111\u1ea7u ti\u00ean b\u1ea1n truy c\u1eadp th\u01b0 m\u1ee5c, c\u00f3 th\u1ec3 m\u1ea5t v\u00e0i ph\u00fat \u0111\u1ec3 \u0111\u1ed3ng b\u1ed9 h\u00f3a n\u1ed9i dung. Sau \u0111\u00f3, vi\u1ec7c truy c\u1eadp th\u01b0 m\u1ee5c g\u1ea7n nh\u01b0 ngay l\u1eadp t\u1ee9c.<\/p>\n<p>Ngu\u1ed3n: https:\/\/www.linode.com\/docs\/guides\/access-your-box-account-from-your-linode\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu b\u1ea1n \u0111\u00e3 kh\u00e1m ph\u00e1 ra&nbsp;Box&nbsp;th\u00ec b\u1ea1n bi\u1ebft r\u1eb1ng n\u00f3 c\u00f3 th\u1ec3 l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 tuy\u1ec7t v\u1eddi \u0111\u1ec3 l\u01b0u tr\u1eef, di chuy\u1ec3n v\u00e0 qu\u1ea3n l\u00fd t\u1ec7p. H\u01b0\u1edbng d\u1eabn sau \u0111\u00e2y gi\u00fap b\u1ea1n c\u00e0i \u0111\u1eb7t v\u00e0 c\u1ea5u h\u00ecnh m\u1ed9t ph\u1ea7n m\u1ec1m mi\u1ec5n ph\u00ed gi\u00fap truy c\u1eadp Box t\u1eeb Linode c\u1ee7a b\u1ea1n d\u1ec5 d\u00e0ng h\u01a1n. Tr\u01b0\u1edbc<\/p>\n","protected":false},"author":1,"featured_media":35528,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[],"class_list":["post-34885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-storage"],"_links":{"self":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/34885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/comments?post=34885"}],"version-history":[{"count":0,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/posts\/34885\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media\/35528"}],"wp:attachment":[{"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/media?parent=34885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/categories?post=34885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jupitek.maudemo.vip\/index.php\/wp-json\/wp\/v2\/tags?post=34885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}