I'm trying to upload files to Ubuntu server using sftp
. I use put -r dir
to upload a folder with all its content. When I run the command it gives something like the following:
Uploading AuthApp/ to /var/www/html/AuthApp remote open("/var/www/html/AuthApp/.DS_Store"): Permission denied
Uploading of file AuthApp/.DS_Store to /var/www/html/AuthApp/.DS_Store failed!
remote open("/var/www/html/AuthApp/.gitattributes"): Permission denied
Uploading of file AuthApp/.gitattributes to /var/www/html/AuthApp/.gitattributes failed!
remote open("/var/www/html/AuthApp/.gitignore"): Permission denied
Uploading of file AuthApp/.gitignore to /var/www/html/AuthApp/.gitignore failed!
remote open("/var/www/html/AuthApp/artisan"): Permission denied
Uploading of file AuthApp/artisan to /var/www/html/AuthApp/artisan failed!
remote open("/var/www/html/AuthApp/composer.json"): Permission denied
Uploading of file AuthApp/composer.json to /var/www/html/AuthApp/composer.json failed!
remote open("/var/www/html/AuthApp/composer.lock"): Permission denied
Uploading of file AuthApp/composer.lock to /var/www/html/AuthApp/composer.lock failed!
remote open("/var/www/html/AuthApp/CONTRIBUTING.md"): Permission denied
Uploading of file AuthApp/CONTRIBUTING.md to /var/www/html/AuthApp/CONTRIBUTING.md failed!
remote open("/var/www/html/AuthApp/phpunit.xml"): Permission denied
Uploading of file AuthApp/phpunit.xml to /var/www/html/AuthApp/phpunit.xml failed!
remote open("/var/www/html/AuthApp/readme.md"): Permission denied
Uploading of file AuthApp/readme.md to /var/www/html/AuthApp/readme.md failed!
remote open("/var/www/html/AuthApp/server.php"): Permission denied
Uploading of file AuthApp/server.php to /var/www/html/AuthApp/server.php failed!
Couldn't setstat on "/var/www/html/AuthApp": Permission denied
I tried to change permissions, add user and apache to the group but nothing works. What else am I missing?