Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have created a sftp user which is able to login with sftp to /home which then lists all the sites on the server.

When I try and delete one of the files or overwrite one of the files I am told by my ftp software that I do not have permissions to do this.

I ran the following commands:

sudo adduser <user> www-data
sudo chown -R www-data:www-data /home
sudo chmod -R g+rw /home
/etc/init.d/ssh restart

I am still able to sftp in and view files but still cannot modify anything.

Any ideas what else I need to do?

share|improve this question
Can you log in via ssh with that user properly? What user is that? www-data? –  Jorge Suárez de Lis Jan 15 '13 at 20:47
Recursively changing ownership of /home to www-data feels very wrong security-wise. I am surprised you still can log in, sshd is usually picky about home folder permissions. –  Sergey Jan 15 '13 at 21:13
correct me if I am wrong. If I have added <user> to the group www-data and then recursively changed the permissions on /home, then should I not be able to login with sftp and make changes to the files? –  Craig Edmonds Jan 16 '13 at 8:26
Have you found a solution for this? –  Sobiaholic Nov 1 '13 at 20:43
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.