WinSCP not working correctly

Posted December 3, 2013 7.2k views
Hi! I set up my Debian 7.1 droplet according to the tutorials, and created a new user with admin rights. I want to use that user to copy files over with WinSCP, but I get "scp /path permission denied" messages, even after giving that user chown and chmod 777 rights to my /var/www folder. What should still be set up? Csaba

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
What's the output of:
ls -la /var/www
drwxrwxrwx 2 customuser root 4096 Dec 3 06:56 .
drwxr-xr-x 12 root root 4096 Dec 3 06:56 ..
-rw-r--r-- 1 root root 177 Dec 3 06:56 index.html
Ok, my lack of knowledge... I thought that chown is recursive by default, but it's not.
In order to change ownership of a directory and all of its files, you have to use chown -R.
This solved my problem. (Still would be nice to include in the initial server setup tutorial, though :) )
Have you considered using SFTP, instead of SCP?


Given that both SCP and SFTP utilize the SSH protocol in connecting to another computer, the two methods are fairly equal in regard to security. SFTP has a slight edge in regard to efficiency, because an interrupted file-transfer can resume where it left off in the event of a broken connection that is later re-established.
See How To Use Filezilla to Transfer and Manage Files Securely on your VPS.
by Pablo Carranza
This article will teach you how to use Filezilla to transfer and manage files securely on your VPS.