cant access aws server with filezilla

dear all hi

i have an issue connecting and transferring files to my aws ec2 instance.
i can ssh to my ec2 instance with no issue.
i have port 80 and 22 open
i installed vsftpd       apt-get install vsftpd

- connecting with ubuntu user name (using pkk file and sftp)
   i can connect with ubuntu user name but i cannot transfer file   (permession issue)
Status:      Disconnected from server
Status:      Connecting to ec2-52-89-192-18.us-west-2.compute.amazonaws.com...
Status:      Connected to ec2-52-89-192-18.us-west-2.compute.amazonaws.com
Status:      Retrieving directory listing...
Status:      Listing directory /home/ubuntu
Status:      Directory listing of "/home/ubuntu" successful
Status:      Retrieving directory listing of "/var"...
Status:      Listing directory /var
Status:      Directory listing of "/var" successful
Status:      Retrieving directory listing of "/var/www"...
Status:      Listing directory /var/www
Status:      Directory listing of "/var/www" successful
Status:      Retrieving directory listing of "/var/www/html"...
Status:      Listing directory /var/www/html
Status:      Directory listing of "/var/www/html" successful
Status:      Connecting to ec2-52-89-192-18.us-west-2.compute.amazonaws.com...
Status:      Connected to ec2-52-89-192-18.us-west-2.compute.amazonaws.com
Status:      Starting upload of C:\Users\slim\Desktop\asd.txt
Command:      cd "/var/www/html"
Response:      New directory is: "/var/www/html"
Command:      put "C:\Users\slim\Desktop\asd.txt" "asd.txt"
Error:      /var/www/html/asd.txt: open for write: permission denied
Error:      File transfer failed
Status:      Starting upload of C:\Users\slim\Desktop\asd.txt
Status:      Retrieving directory listing of "/var/www/html"...
Status:      Listing directory /var/www/html
Command:      put "C:\Users\slim\Desktop\asd.txt" "asd.txt"
Error:      /var/www/html/asd.txt: open for write: permission denied
Error:      File transfer failed
Status:      Starting upload of C:\Users\slim\Desktop\asd.txt
Status:      Retrieving directory listing of "/var/www/html"...
Status:      Listing directory /var/www/html
Command:      put "C:\Users\slim\Desktop\asd.txt" "asd.txt"
Error:      /var/www/html/asd.txt: open for write: permission denied
Error:      File transfer failed
Status:      Retrieving directory listing of "/var/www/html"...
Status:      Listing directory /var/www/html
Status:      Directory listing of "/var/www/html" successful



- connecting with root (using pkk file, sftp, root is enabled)
   i cannot connect to my ec2 instance

Status:      Disconnected from server
Status:      Connecting to ec2-52-89-192-18.us-west-2.compute.amazonaws.com...
Status:      Connected to ec2-52-89-192-18.us-west-2.compute.amazonaws.com
Error:      Received unexpected end-of-file from SFTP server
Error:      Could not connect to server
Status:      Waiting to retry...
Status:      Connecting to ec2-52-89-192-18.us-west-2.compute.amazonaws.com...
Response:      fzSftp started, protocol_version=4
Command:      keyfile "C:\Users\slim\Desktop\AWS\school.ppk"
Command:      open "root@ec2-52-89-192-18.us-west-2.compute.amazonaws.com" 22
Status:      Connected to ec2-52-89-192-18.us-west-2.compute.amazonaws.com
Error:      Received unexpected end-of-file from SFTP server
Error:      Could not connect to server
 
kindly i would like a way to securely and easily transfer files to my ec2 instance.
sl_aiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan CraciunIT ConsultantCommented:
Root login is disabled by default in most installs.

Add your user to the group that owns /var/www/html (usually www) and you'll be able to transfer files.

usermod -a -G www yourusername

HTH,
Dan
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sl_aiAuthor Commented:
thank you it helped
0
Dan CraciunIT ConsultantCommented:
You're welcome.

So what was the problem? Why the B rating?
0
Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

sl_aiAuthor Commented:
well i did a search on the command line that you gave me.
the search took me to an interesting page.
http://www.comtechies.com/2013/01/how-to-upload-and-download-files-in.html

there is this solution is that i can transfer the file to ubuntu home directory (using ubuntu user namecredential with filezilla) and then i ssh the ec2 instance and relocate the file to /www/htm   without the need to add root to the group that owns www.

you response guided me to what i consider a suitable solution for my issue.

thank you
0
Dan CraciunIT ConsultantCommented:
I did not say add root to the www group :)
For 2 reasons:
1. root can do pretty much anything, so adding it to a group would make no difference.
2. you cannot login as root, so again, giving root rights is pointless.

I said add your user to the www group. That way you can upload files directly and not in 2 steps.

Btw, since you're just moving files as root you should be OK, but if you create files as root you won't be able to access them with a browser until you change the owner.
0
sl_aiAuthor Commented:
thank you very much
well exactly i could not access the files with chrome.
i will change the ownership now.

i appreciate your responsiveness i wish i could give you A  right now
0
Dan CraciunIT ConsultantCommented:
So... you want to do chown each time you create the files, instead of a usermod one time.
Not very efficient, don't you think?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.