문제

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

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top