M
M
Maxim Ivanov2016-03-12 16:54:11
PHP
Maxim Ivanov, 2016-03-12 16:54:11

Why php scripts in apache under ubuntu create files with private access?

I added a host, I create a file in the script, and here it is immediately protected from editing, what should I do?
Simply using chmod will not help, because if you use other people's engines, for example, WP, an error immediately occurs there.
1bf3eda8c58f488fb0b10bec20e5f4e7.png
Configuration conf file

<VirtualHost *:80>
    
        ServerName newdos
        ServerAdmin [email protected]
        DocumentRoot /var/www/newdos/

</VirtualHost>

through the console, the
134db26dcaf44a2abd796a85615bfbd0.png
ls-l file is normally created,
fa8ecfd6054443c69091b7e0657084b9
but the file.php
script creates 2.txt, also with a lock
eaba2029251742f7b5557aed9ddb8349.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rikcon, 2016-03-12
@splincodewd

Because Apache creates files on behalf of the www-data user and group (by default if left).
Add your user to the www-data group and you will be able to edit these files too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question