Get permission to work with files on my Amazon EC2 Ubuntu server using FTP-WinSCP

18,408

Solution 1

A lot of answers say to change permissions on /var/www/ ... however AWS shortcuts out of the WWW folder and into the /var/app/current/ directory. If all else fails try:

sudo chown -R -v ec2-user /var/app/current/

Solution 2

On Ubuntu image in AWS, default user is ubuntu. Instead of using system folders like /var/... better to use /home/your_folder. Then change the ownership using {chown} command. For eg.

$ sudo chown -R -v ubuntu /home/your_folder/

This will change the ownership of 'your_folder' and contents inside it from 'root' user to 'ubuntu'. Then Winscp should be able to upload/delete/create files using SFTP/FTP etc..

Share:
18,408
Imnotapotato
Author by

Imnotapotato

Updated on June 04, 2022

Comments

  • Imnotapotato
    Imnotapotato almost 2 years

    I have an Ubuntu server on Amazon, I installed everything for working with it (php, mysql, phpmyadmin, apache..), The problem is that I cant move around or edit files using the FTP.

    I get the error message:

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

    from my WINSCP.

    The only way I can trancefer/edit file is using 'putty' with the sudo/nano command.

    I found a lot of information about this on google, but there are no updated soulution I can find. Linux isn't my usual work-space.

    How do I get the permissions working for the WINSCP ?