Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Ec2 FTP Write Permission [closed]

I am able to successfully connect to amazon ec2 instance using filezilla. The Username i used is ec2-user. So when i try to transfer my application war to tomcat it says

/var/lib/tomcat6/webapps/RealEstateERP.war: open for write: permission denied
 Error: File transfer failed.

I tried to change permission use filezilla but not allowed to do so. I know there is no write permission, but how do i change it.

I ma new to linux. Please help me.

like image 504
vikas27 Avatar asked Apr 26 '12 16:04

vikas27


People also ask

How do I change my FTP on AWS?

Open the AWS Transfer Family console at https://console.aws.amazon.com/transfer/ and select Servers from the navigation pane, then choose Create server. In Choose protocols, select FTP, and then choose Next. In Choose an identity provider, choose the identity provider that you want to use to manage user access.

How do I give EC2 root permission?

You can enable password and root login using the following procedure: Update the cloud-init configuration file to allow root access and password login. Update the authorized_keys file. Update the sshd_config file to enable password authentication and root login.

What is FTP in AWS?

The AWS Transfer Family announces AWS Transfer for FTPS and AWS Transfer for FTP, which makes it easy to migrate File Transfer Protocol over SSL (FTPS) and FTP workloads to AWS. With the launch of AWS Transfer for SFTP in November 2018, this expands support to three of the most commonly used data transfer protocols.


1 Answers

The ec2-user don't have permission to write files in /var/lib/tomcat6/webapps/. Only root user can do so. You have two ways here to do so:

1) Copy files to /home/ec2-user/ using filezilla. Now SSH into linux machine through putty. Change to root user using command sudo -s. Then copy file from /home/ec2-user to /var/lib/tomcat6/webapps/ using command cp -i RealEstateERP.war /var/lib/tomcat6/webapps/.

2) SSH into linux machine through putty.Change to root user using command sudo -s.Provide write permission to all users on /var/lib/tomcat6/webapps/ using command chmod 777 /var/lib/tomcat6/webapps/. Then copy files to directory directly from filezilla.

like image 146
shashankaholic Avatar answered Oct 07 '22 13:10

shashankaholic