Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 14917  / 2 Years ago, fri, march 11, 2022, 2:49:29

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?


More From » permissions

 Answers
3

You need to include yourself into the www-data group.



Graphical method



Command line:



sudo adduser gautvedt www-data


That way you can add things to directories where www-data owns the group.






There are more methods but this is the easiest one.


[#35354] Sunday, March 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eryeath

Total Points: 122
Total Questions: 121
Total Answers: 112

Location: Saint Helena
Member since Fri, Aug 26, 2022
2 Years ago
eryeath questions
Sat, May 28, 22, 09:50, 2 Years ago
Fri, Sep 9, 22, 13:09, 2 Years ago
Wed, Sep 8, 21, 03:57, 3 Years ago
Fri, Mar 17, 23, 00:13, 1 Year ago
Sat, Apr 16, 22, 06:07, 2 Years ago
;