My article How to Launch a Cloud Encoding Computer just posted on the Streaming Media Global site. Good thing, too, because I had just started a consulting project that required setting up and encoding on multiple AWS instances. Always handy to have a step-by-step guide, so I printed the article draft and went through it point by point to get up and running.
Then I started trying to transfer files to an instance with FileZilla and got a “write:permission denied” error. Not to rant, but don’t you hate it when a machine you just securely signed up for (key pair and all!) and are renting by the hour uses a security-related concern to prevent you from actually using what you’re paying for?
Anyway, since this didn’t happen the first few hundred times I rented an AWS instance, I didn’t cover it in the Streaming Media article. Now it seems that many readers may encounter the same issue so I wanted to address it here.
A quick Google search revealed the Stack Overflow article entitled Amazon AWS Filezilla transfer permission denied. The article proposes the following three OS-specific fixes to run in Terminal. With each, you have to point to the folder you’re giving permissions to, which will also give permissions to subfolders within that folder. The Stack Overflow example was to a web folder; for me, it was a video folder off the root.
Here are the fixes from the Stack Overflow article:
if you are using centOs then use
sudo chown -R centos:centos /var/www/html
sudo chmod -R 755 /var/www/html
For Ubuntu
sudo chown -R ubuntu:ubuntu /var/www/html
sudo chmod -R 755 /var/www/html
For Amazon ami
sudo chown -R ec2-user:ec2-user /var/www/html
sudo chmod -R 755 /var/www/html
Since I was working with an Amazon instance I tried the third approach first, which didn’t work. Then I tried the Ubuntu correction (since it was an Ubuntu instance), and that did work.