Answer the question
In order to leave comments, you need to log in
How to setup apache access in ubuntu?
Hello.
Created a folder in home directory
/home/myusername/www/home/
drwxrwxr-x 3 myusername myusername 4096 Nov 7 16:42 www/
drwxrwxr-x 2 myusername myusername 4096 Nov 7 16:43 home/
<?php
file_put_contents("www1.txt","Test");
echo "OK";
Answer the question
In order to leave comments, you need to log in
Make the user of this directory yourself and the group www-data and add yourself to it.
Set the permissions on the directory to 660
I set the rights to
drw-rw-r-- 3 myusername www-data 4096 Nov 7 16:42 www/
now I can’t enter this folder at all ...
But doesn’t this mean that me and the www-data group can edit files and read, and everyone else just read?
In general, chmod -R 774 www/
solved the problem. And apache works and the user can edit everything.
Does anyone know if this is normal?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question