Permissions to copy files

January 1, 2014 1.8k views
Hello everyone, i have setup LAMP in Ubuntu 13.10, but i can´t copy or delete any file over any SFTP client, what can i do to resolve this?
5 Answers
What user are you connecting as and what directory are you trying to write to?
Thanks for your help Kamal, im using a user that i created since i disabled root access via ssh, the folder is the default web root /var/www/.
You need to make sure that your user has write access to whatever folder you want that user to be able to modify files. Check out Linux Permissions Basics and How to Use Umask on a VPS.
by Justin Ellingwood
In this article, we will discuss how to read and manipulate Linux permissions. We will cover how to use the "umask" command to choose default permission settings, and the "chmod" command, which can change the permissions of files and directories.
Thanks for linking that topic, helped alot in understanding the permissions system.
I switched to ngnix web server and in the nginx.conf the default permissions are assigned to www-data group.
If i use a user that is in the www-data group ill have permissions to access the web root right?
If so, is it secure too add the user that i created with root permissions to the www-data group or should i create another user just to use it to connect via SFTP, assigned to the www-data group?
Anyway i have been messing around with this and ended up creating a new user in a new group to only access the html folder to be able to access it via SFTP and its working fine.
Thanks everyone for your help and time.
Have another answer? Share your knowledge.