Aws EC2 EBS setup gives error ls: cannot open directory /mnt/my-data/: permission denied
amazon-ec2
Solution
When you create /mnt/my-data using the above two commands, the directory ends up being owned by root. In order to change this:
sudo chown -R ec2-user:ec2-user /mnt/my-data
(Assuming ec2-user is your current user.)
Now it should work and you should be able to use that directory as your regular user.
Problem
I am learning amazon EC2 using the EC2 user guide document. My aim is to attach an EBS volume to a running EC2 instance. I have already done this successfully. However I now want to mount it after connecting through the SSH from my linux machine. I have successfully done the steps provided in the manual: ``` sudo mkdir /mnt/my-data sudo mount /dev/sdf /mnt/my-data ``` (however in my case the sudo mount /dev/sdf1 /mnt/my-data worked instead) But I can't view the contents using `ls /mnt/my-data` (which is also provided as step in the user guide). Do you know why this is happening?