File transfer issues from mac to EC2 via both FileZilla and SSH

Hi all! I've got both FileZilla and Terminal/SSH connected to my EC2
instance, but am having a great deal of trouble uploading files via either
client. Trying to upload the create_db_and_user.sql file and the ROOT.war
file but get 'permission denied' errors in FileZilla and 'Permission denied
(publickey). lost connection' errors in terminal. However, moving the
create_db file to the 'EC2-user' folder instead of 'home' worked; seems
like only certain folders are locked. Since I connected with the .pem I
thought permissions would be open? What's going on?

Thanks!

1 Like

Jordan,

Managing file and directory permissions will be one of your joys as a Linux
system administrator. By default, your ssh sessions are in the context of
the ec2-user, but you can use the "sudo" command to execute commands as the
root user instead. Using sudo, you can change file and directory ownership
and permissions. But you will want to be very careful about what you do and
how you do it, as you can compromise the security of your server by opening
permissions willy-nilly. I'm sure that you can find lots of information
about Linux permissions, Tomcat server management, and more on the web.

EC2 makes it deceptively easy to get started and make progress, but
ultimately managing a Linux server is something that requires quite a lot
in terms of Unix system-administration skills. (Just wait till something
goes wrong! Your ability to respond will be extremely limited if you aren't
an expert sysadmin.)

Best,

Chris

ยทยทยท On Thu, Dec 17, 2015 at 4:39 AM Jordan Levinson wrote:

Hi all! I've got both FileZilla and Terminal/SSH connected to my EC2
instance, but am having a great deal of trouble uploading files via either
client. Trying to upload the create_db_and_user.sql file and the ROOT.war
file but get 'permission denied' errors in FileZilla and 'Permission
denied (publickey). lost connection' errors in terminal. However, moving
the create_db file to the 'EC2-user' folder instead of 'home' worked; seems
like only certain folders are locked. Since I connected with the .pem I
thought permissions would be open? What's going on?

Thanks!

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

the following works
sudo chmod -R 777 /usr/share/tomcat6/webapps

ยทยทยท On Thursday, December 17, 2015 at 3:09:16 PM UTC+5:30, Jordan Levinson wrote: > Hi all! I've got both FileZilla and Terminal/SSH connected to my EC2 instance, but am having a great deal of trouble uploading files via either client. Trying to upload the create_db_and_user.sql file and the ROOT.war file but get 'permission denied' errors in FileZilla and 'Permission denied (publickey). lost connection' errors in terminal. However, moving the create_db file to the 'EC2-user' folder instead of 'home' worked; seems like only certain folders are locked. Since I connected with the .pem I thought permissions would be open? What's going on? > > > Thanks!

Hi Chris,

Thanks for the word of caution :slight_smile: I figured it was something like that, but
do you or anyone else have anything more concrete about this issue
specifically...i.e. which permissions to change during the configuration as
outlined here
https://github.com/opendatakit/opendatakit/wiki/Aggregate-AWS-Install? I
had to run chmod 400 on my key in setting up the SSH; and the git mentions
chmod 755 to access the webapps folder, but doesn't look like I should be
having trouble uploading to the home directory as ec2-user.

Best,
Jordan

ยทยทยท On Thursday, December 17, 2015 at 6:06:02 PM UTC+5:30, Christopher Robert wrote: > > Jordan, > > Managing file and directory permissions will be one of your joys as a > Linux system administrator. By default, your ssh sessions are in the > context of the ec2-user, but you can use the "sudo" command to execute > commands as the root user instead. Using sudo, you can change file and > directory ownership and permissions. But you will want to be very careful > about what you do and how you do it, as you can compromise the security of > your server by opening permissions willy-nilly. I'm sure that you can find > lots of information about Linux permissions, Tomcat server management, and > more on the web. > > EC2 makes it deceptively easy to get started and make progress, but > ultimately managing a Linux server is something that requires quite a lot > in terms of Unix system-administration skills. (Just wait till something > goes wrong! Your ability to respond will be extremely limited if you aren't > an expert sysadmin.) > > Best, > > Chris > > On Thu, Dec 17, 2015 at 4:39 AM Jordan Levinson <jord.l...@gmail.com > wrote: > >> Hi all! I've got both FileZilla and Terminal/SSH connected to my EC2 >> instance, but am having a great deal of trouble uploading files via either >> client. Trying to upload the create_db_and_user.sql file and the >> ROOT.war file but get 'permission denied' errors in FileZilla and 'Permission >> denied (publickey). lost connection' errors in terminal. However, moving >> the create_db file to the 'EC2-user' folder instead of 'home' worked; seems >> like only certain folders are locked. Since I connected with the .pem I >> thought permissions would be open? What's going on? >> >> Thanks! >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >

Hi Jordan,

Sorry, no, I don't really have any easy advice on this. You're well outside
the ODK realm now and into the realm of Tomcat+Linux, and so you should be
able to find tons of Googlable resources to help you. After 3+ years of
managing these kinds of servers, I still find myself having to Google and
read through Stack Overflow explanations far more often than I'd like.

Best,

Chris

ยทยทยท On Fri, Dec 18, 2015 at 2:05 AM Jordan Levinson wrote:

Hi Chris,

Thanks for the word of caution :slight_smile: I figured it was something like that,
but do you or anyone else have anything more concrete about this issue
specifically...i.e. which permissions to change during the configuration as
outlined here
https://github.com/opendatakit/opendatakit/wiki/Aggregate-AWS-Install?
I had to run chmod 400 on my key in setting up the SSH; and the git
mentions chmod 755 to access the webapps folder, but doesn't look like I
should be having trouble uploading to the home directory as ec2-user.

Best,
Jordan

On Thursday, December 17, 2015 at 6:06:02 PM UTC+5:30, Christopher Robert wrote:

Jordan,

Managing file and directory permissions will be one of your joys as a
Linux system administrator. By default, your ssh sessions are in the
context of the ec2-user, but you can use the "sudo" command to execute
commands as the root user instead. Using sudo, you can change file and
directory ownership and permissions. But you will want to be very careful
about what you do and how you do it, as you can compromise the security of
your server by opening permissions willy-nilly. I'm sure that you can find
lots of information about Linux permissions, Tomcat server management, and
more on the web.

EC2 makes it deceptively easy to get started and make progress, but
ultimately managing a Linux server is something that requires quite a lot
in terms of Unix system-administration skills. (Just wait till something
goes wrong! Your ability to respond will be extremely limited if you aren't
an expert sysadmin.)

Best,

Chris

On Thu, Dec 17, 2015 at 4:39 AM Jordan Levinson jord.l...@gmail.com wrote:

Hi all! I've got both FileZilla and Terminal/SSH connected to my EC2

instance, but am having a great deal of trouble uploading files via either
client. Trying to upload the create_db_and_user.sql file and the
ROOT.war file but get 'permission denied' errors in FileZilla and 'Permission
denied (publickey). lost connection' errors in terminal. However, moving
the create_db file to the 'EC2-user' folder instead of 'home' worked; seems
like only certain folders are locked. Since I connected with the .pem I
thought permissions would be open? What's going on?

Thanks!

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send an

email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.