File permission in Linux, Allowing user upload in Amazon ec2 - amazon-ec2

I am making a web app that is hosted on amazon ec2. One of the page allows user to upload photo to the site.
MY script works on ordinary site, but not with ec2, so I suspect the problem is about connection or authorization.
Maybe ordinary web user do not have authorization to upload to the var/www/html/ directory? But how to enable them?
(specifically I think the following line is not working
move_uploaded_file)
I am using AMazon ec2 micro instance Linux AMI server. I am uploading via a form in a php file.

Related

Need a way to mount or share s3 or any other aws storage service in windows ec2 instance

We have use case where we want the ability to create shareable drive that would link our ec2 windows instance with any of the storage service (s3 or any other service), such that our user would upload their pdf files in that storage and will be accessible by our windows ec2 instance in which we have program that does pdf files processing. So is there way we can achieve this in aws?
Since your Windows software requires a 'local drive' to detect input files, you could mount an Amazon S3 bucket using utilities such as:
Cloudberry Drive
TntDrive
Mountain Duck
ExpanDrive
Your web application would still be responsible for authenticating users and Uploading objects using presigned URLs - Amazon Simple Storage Service directly to Amazon S3. Your app would also need to determine how to handle the 'output' files so that users can access their converted file.

How to share file in Windows Amazon EC2 instance

I am using an Amazon EC2 instance running Windows.
How can I share a file to external users that are not in the same network but they have internet access? If there is an option by doing it programmatically, it will be very useful.
Thank you.
Your situation is not specific to Amazon EC2. The answer would be applicable to any Windows computer on the Internet.
The easiest way for a computer to "share a file to external users" would be via a web server. Users could simply click a link in the web browser and the file would download.
However, since you are running on AWS, you might want to take advantage of Amazon S3, which is a an object storage service. You could upload the file from the Windows computer to Amazon S3 and then make the file publicly available via a URL. This way, your users will be able to access the file without having to connect to the Windows computer. It would also be more reliable and could handle more traffic than the Windows computer. You can programmatically upload to an Amazon S3 bucket.

How to assign FTP URL

I got an AMI of Windows Server 2012 running on Amazon, and use it as website container for all my web sites. I recently created an app in WinForms, I need to publish it. In the moment that I use the publish option it asks for an FTP site. I already use FileZilla Server. I created an user and account. The matter here is that it asks for an FTP URL (ftp.example.com) and I only got (http://example.com). I try to do this with IIS but only can do it with HTTP. How can I create an FTP URL for the site that will contains my ClickOnce app ?.
Check Public DNS column on Instances page of Amazon EC2 console.
Note that the public DNS may change when the instance is restarted.
So your FTP URL would be like:
ftp://ec2-45-123-87-128.us-west-2.compute.amazonaws.com/
Though, you need to configure the instance firewall to allow the FTP traffic, what is not easy in general. But that's out of scope of your question.

How can I access any files in Amazon EBS through URI?

I have a question about the direct way to access file in EBS.
If I have an EC2 and EBS already and have a file 'a.pdf', can I access 'a.pdf' through URI? even out of EC2?
for example, my friend Mike wants to get 'a.pdf' file at his house just using Web browser or teminal program, etc. Please tell me what action does Mike have to do!
Thanks!
If you have an EC2 instance running you can set up a web server on your EC2 instance, mount the EBS volume and access the file via the web server.
AFAIK there is no way to access files in EBS directly - if this is what you need you should be using S3.

Permission denied issues with Amazon EC2 and S3 hosting

I hired a freelancer to develop a PHP CI application hosted on Amazon EC2, and the app doesn't work. I am using Wowza with EC2 and S3. I have been seeing permission denied problems. I have Ubuntu and I'm trying to install a LAMP server and run public DNS on the instance. I have set up SSH as well.
I found the elastic IP of the instance we are running and used GoDaddy domain manager. I thought that simply pointing the domain to the instance would work. Do I have to change the nameservers on GoDaddy's side as well? Where would I find the right ones?
I have very little server-side understanding. I'm sure the solution is just a simple change, something like one line of code, a different user name or a different ID number. What do I need to do?
you should point your domain to your elastic ip of your EC2 instance. This should be done from where you host your DNS server. If you don't have one, you can change the settings inside the godaddy account to point to your DNS service.

Resources