本文介绍了不同的OS Server传输文件在AWS S3 Bucket上不起作用,仅当Windows到Windows时才起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置AWS S3存储桶时遇到问题,该服务器已经在两个服务器Linux和Windows上运行.首先,我要测试传输文件是否正确.我使用Windows到Windows的传输.我的代码功能正常,然后第二次测试Linux至Windows.目前,传输无法正常进行.如果需要在Linux中进行配置,我不知道为什么它不起作用.

I have problem setting up my AWS S3 bucket, the server already running on both two server Linux and Windows. The first the that I do to test if the transferring files is correct. I used the Windows to Windows transfer. the function of my codes is working, then second test Linux to Windows. Right now the transferring is not working. I don't know why its not working, if there is configuration need to do in Linux.

我将与您分享我在laravel上编写的示例代码.

I will share to youthe sample code that I made on laravel.

exec('aws s3 cp s3://compexp/11-11-2019/'01150exp.zip'  \\\\'xxx.xxx.xx'/c/kitpos/update');

当我尝试使用Linux AWS终端时,它显示如下:

When I tried to my Linux AWS terminal it shows look like this:

推荐答案

您只能将文件复制到本地存储,因此需要挂载外部Windows存储,作为Linux文件系统的文件夹.并且仅在该复制文件之后.

You can Copy files only to local storage, so you need to mount external Windows storage, as a folder to your Linux-filesystem. And only after that copy file.

您可以在此处阅读如何将Windows文件夹安装到Linux- https://www.poftut.com/how-to-mount-nfs-share-in-linux-and-windows/

You can read how to mount Windows folder to Linux here - https://www.poftut.com/how-to-mount-nfs-share-in-linux-and-windows/

但是我认为这是一个不好的做法.为什么不能直接从Windows拉文件?

But I think this is a bad practice. Why can't you pull files directly from Windows?

这篇关于不同的OS Server传输文件在AWS S3 Bucket上不起作用,仅当Windows到Windows时才起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 03:27