My user can't upload files to folders owned by www-data
Posted
by
Thomas Gautvedt
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Thomas Gautvedt
Published on 2012-09-24T10:32:42Z
Indexed on
2012/10/30
11:21 UTC
Read the original article
Hit count: 266
permissions
|webserver
I think I have screwed up my permissions in Ubuntu.
I am using my server to run PHP. I recently ran across a problem where PHP could not create directories in the var/www
-directory, so I searched around on the internet. Now PHP can write and access anything like it should, but as a user, I can't create new folders or files anymore.
Right now, the permissions for folders are like this:
drwxrwsr-x 2 www-data www-data [Folders]
This is the permissions when I upload using sftp:
-rw-rw-r-- 1 gautvedt www-data [Folders]
What have I done wrong and how can I change this?
© Ask Ubuntu or respective owner