Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"aws s3 cp" fails silently when user has no write permissions on local directory #1069

Closed
senderista opened this issue Dec 20, 2014 · 8 comments

Comments

@senderista
Copy link

I just spun up a new EC2 instance and formatted an ephemeral storage volume. When I attempted to copy a (very large) S3 object to the root directory of that volume, the command completed immediately, with no output at all. Eventually I determined that only root had write permissions on the root directory of the volume, and granted write permissions to ec2-user, after which the command completed successfully. It would have been very helpful to have been given some idea of the reason for the failure, or any output at all for that matter.

@jamesls
Copy link
Member

jamesls commented Dec 22, 2014

What version of the CLI are you using? This has been fixed in later versions of the CLI. I just tried this on the latest versions and you'll get an error message:

$ aws s3 cp s3://bucket/install-cli.py root-only/foo.py
download failed: s3://bucket/install-cli.py to root-only/foo.py [Errno 13] Permission denied: u'/home/ec2-user/root-only/foo.py'
$ echo $?
1
$ aws --version
aws-cli/1.6.10 Python/2.6.9 Linux/3.10.42-52.145.amzn1.x86_64

Let us know if you're still seeing these issues on 1.6.10.

@ozbillwang
Copy link

@jamesls

I got the same issue with awscli on ubuntu

$ aws --version
aws-cli/1.7.0 Python/3.4.3+ Linux/4.2.0-19-generic

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.10"
VERSION_ID="15.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

@rbwinslow
Copy link

I also just ran into this.

aws-cli/1.7.26 Python/2.7.9 Linux/3.14.42-31.38.amzn1.x86_64

@jamesls
Copy link
Member

jamesls commented Dec 7, 2015

This was fixed in a later version of the AWS CLI (1.9.8). If you upgrade to the latest version, these problems should go away.

@ozbillwang
Copy link

Thanks, @jamesls
Could you please share me the commits for this bug fix in v1.9.8? I am more interesting on the codes.

No worried any more. I should be fine to find it out.

@jamesls
Copy link
Member

jamesls commented Dec 7, 2015

Original fix was a community contribution: https://github.com/aws/aws-cli/pull/1646/files
I made some small changes and added integration tests: https://github.com/aws/aws-cli/pull/1648/files

@ozbillwang
Copy link

Thanks again. 👍

@AndrewMcFarren
Copy link

Seeing the same issue since upgrade to 1.16.1. My downloads are failing with aws s3 cp. My environment is as follows. From debug, I am wondering if python related.

aws-cli/1.16.1 Python/2.7.14 Linux/4.14.62-65.117.amzn1.x86_64 botocore/1.11.1
pip 18.0 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
Python 2.7.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants