M
M
Minister of Defense2021-01-29 03:09:57
PHP
Minister of Defense, 2021-01-29 03:09:57

Why does a member of a group with full access create a file that the group cannot access?

Rights to the folder root: www-data - group full access (recursively).
I put myself in the www-data group, rebooted, I'm in the group - I also have full access to the folder.
I execute the php script error_log('test', 3, 'test.log'), the file is naturally created by the user www-data (server) from my www-data group, BUT the rights on the file are: www-data owner - full access, group www-data - read (can't delete it in a simple way).

What's wrong, why members of the same group with full access to the folder don't have access to a file created by a group member?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2021-01-29
@galaxy

can't remove it the easy way

To delete a file, you need write permissions to the folder.
What exactly is the problem? Need other permissions to be on files generated by PHP?
umask (but it's really more reliable to do just chmod after creation)

S
Saboteur, 2021-01-30
@saboteur_kiev

umask?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question