Files and directory owner problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fibag
Forum Newbie
Posts: 3
Joined: Fri Nov 18, 2005 4:00 pm

Files and directory owner problem

Post by fibag »

Hi,

On my site (actually my wife site, but ...), I create an XML file using "inscription.php". Afterwards, this file should be used by other php files. Since a few days, this does not work anymore (it worked fine, and it still does on other directories).

While looking for the reason of the problem, I've discovered the following: when "inscription.php" creates a file, the file owner is "1332218" (provided by fileowner()), while if I create a file with another php file, the owner is "136xxxx", ie another userid. Does anybody have an idea on the reason of this ?

Thanks in advance

fibag
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Unless this is your own server (in which case disregard) - have you spoken to your host about this if it's a recent change they may have changed some configuration which they need to be informed about the consequences of.

Mac
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

If your script generates it (it's probably apache that is executing the php script) thus the file will be owned by apache.

If you launch a script and generate something, the file will be owned by you.

If you are seeing userids instead of "nice names" there is probably something b0rken on your server that replaces those uids by name... (Usually a nss(-ldap) issue)
fibag
Forum Newbie
Posts: 3
Joined: Fri Nov 18, 2005 4:00 pm

Post by fibag »

Hi,

Thanks for these hints. Actually, in parallel with this post, I also sent a message to my host. But you know, it's cheap, so, up to know (for sure in a WE) I do not have any feedback.

Currently trying to install my own linux svr on a VMWare so that I, at least, can try reproduce the problem. In the future, I more and more think of also asking my host to give me a VM and "basta".

fibag
Post Reply