Domanda

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

È stato utile?

Soluzione

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

Altri suggerimenti

The files get written as the user the web server is running under. in your case nobody is the user that the web server is running

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top