I had the following problem, since the safe mode is enabled on the server, and directories are created by different users:
- I upload my script to the server, it appears as belonging to "user1". All he does is create a new directory when creating a new user so that he can store files in it.
- A new directory has been created, but it belongs to the user "apache".
- 'user1' and 'apache' are different users; and safe mode is enabled. Thus, php script cannot write to this newly created directory.
- Now I have a problem!
One solution is to disable safe mode. In addition, a colleague suggested that there are settings that can be changed to ensure that directories are under the same username as the script. Therefore, I look to see if the latter can be done.
But I have to ask. Is there a software solution for my problem?
I tend to "no" because safe mode was implemented to solve it at the php level. Also, the actual problem may seem that the directory is being created by another user, so a software fix can be just a range fix.
source share