Amazon AWS and Win SCP File transfer issue



Amazon AWS and Win SCP File transfer issue

I have setup a amazon AWS ec2 instance running ubuntu.

Now, I am trying to connect it with the Win SCP.

Connection part is completed using the public key and I can browse files as well as use putty to perform commands. By default an user named 'ubuntu' is created. Problem starts when I try to perform file transferring.

If, I just drag and drop files from my computer (Win SCP left side) to the remote machine (Win SCP right side) it shows an error,

Permission denied.
Error code: 3
Error message from server: Permission denied

Now, there are certain resolutions available over the net to handle that,

In a jest, I have to provide permissions to the concerned folders.

sudo chown -R -v ubuntu /home/your_folder/
chmod 777 /home/your_folder/

Here the problem starts, the moment I execute `sudo chown..` command, it shows me a different error,

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

This leads to the following resolution,

pkexec chown ubuntu:ubuntu /etc/sudoers /etc/sudoers.d -R

Now, it asks me for the password,

==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/chown' as the super user
Authenticating as: Ubuntu (ubuntu)

Probably, I am going too far and it is not the way to resolve the matter. Regarding the password, I have a public key file so, can't enter one when prompted. Can any one have any idea regarding the problem and solution ? If I try to make the current user a super user that too require root permission.

Reply with quote



You can post new topics in this forum