Hi,
So far, I can only use php to write a file if the containing folder is either owned or grouped to "nobody" (which is what PHP runs as in my Linux server).
Then along comes "SquirrelMail" which I installed recently. With SquirrelMail, you log in with your Linux username and password to check mail. Anyone with a telnet account can log in. But I noticed the user and group of the files it creates. When you create say a new folder for mail, it saves a file in your username folder AS IF IT WAS YOU, instead of being "nobody".
Without tearing the program's code apart, how does it do that? The cool thing is, I never had to set permissions or anything.
This would really be a step forward in my programming, please let me know if you have the answer to it.
Many thanks in advance,
Sam