Solved

copy files to ubuntu webserver

Posted on 2014-09-17
3
209 Views
Last Modified: 2014-11-12
Hi, I setup an Ubuntu instance on AWS EC2 and install LAMP webserver. I tried to copy a file test.php to /var/www/html folder, but it said Permission denied

I used the following command in Terminal on my Mac:

scp -i mypem.pem test.php ubuntu@ec2-54-206-105-243.ap-southeast 2.compute.amazonaws.com:/var/www/html

My questions are:
1. Do I need to change the /var/www/html folder permission before I copy files to it?
2. Besides the SSH, can I use a GUI tool to do the files transferring?  


Please advise. thanks
0
Comment
Question by:tonitoni99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40328256
You need to either copy as root or grant ownership to web directries to your ubuntu user (make sure apache cannot rewrite web content)
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40328336
A WinSCP alternative for MacOS would be Cyberduck http://sourceforge.net/projects/cyberduck/
0
 
LVL 62

Expert Comment

by:gheist
ID: 40328448
Filezilla too...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Intel fortran compiler (ifort) 5 59
error while installing php56 in redhat enterprise linux 20 77
rsync: Full and Daily 5 42
check the file dates in unix 14 30
If you are thinking of adopting cloud services, or just curious as to what ‘the cloud’ can offer then the leader according to Gartner for Infrastructure as a Service (IaaS) is Amazon Web Services (AWS).  When I started using AWS I was completely new…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question