phpserver-configuration

'nobody' own the file created through php


one of my customers uses a personal server that sets the default owner to 'nobody' so he can't write on or delete any of those files. I have brutally solved this problem manually creating the needed files, but thi sin't a solution because I still need to craeted files with names that I can't forecast.

Is there any php solution or server configuration that I can provide to finally solve this problem?

Some images:

enter image description here

and

enter image description here


Solution

  • To get the right permissions, you can set the group setuid bit on the directory with

    chmod g+rwxs dirname

    This will ensure that files created in the directory are owned by the group. You should then make sure everyone runs with umask 002 or 007.

    PHP CHMOD Link