aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.05k stars 323 forks source link

session on ubuntu with amazon-ssm-agent snap installed has non-writeable cwd #598

Open toabctl opened 2 hours ago

toabctl commented 2 hours ago

On a recent Ubuntu instance running amazon-ssm-agent version 3.3.987.0 (installed from the snapstore), the working directory on a newly created session is a readonly directory.

$ aws ssm start-session --target i-0e0d6b6d0d84843b2

Starting session with SessionId: tom-a6rd2j5dx36y98yggjegiu3poq
$ pwd
/var/snap/amazon-ssm-agent/9881
$ 

That is confusing for users especially when they try to call basic commands like:

$ echo "foo" > testfile
sh: 2: cannot create testfile: Permission denied

changing the default working directory to /home/ssm-user for a session would be good:

$ cd
$ pwd
/home/ssm-user
toabctl commented 2 hours ago

The Canonical public cloud team received a bug report for that: https://bugs.launchpad.net/cloud-images/+bug/2082447