[Site Home] [Forum Home] [Articles] [File DB] [News Archives]

Programming -> wrong user/group when files are created with fopen


(View original topic)


Fat Cat - Apr-01-2004 server time
this may be a stupid suggestion from a newbie, but have you closed the file at the end of each write script ? (fclose) . If left open you won't be able to reopen it.

Red Squirrel - Mar-29-2004 server time
Hmmm weird.... if it's chmodded to 777 any user should be able to access it, and fopen chmods to 777 by default I believe. Maybe check php.ini to make sure this is in fact right, maybe there's a setting in there somewhere. I never seen one but never looked far in that file either. Had a few things to change in it and that's it.

Master of Puppets - Mar-29-2004 server time
When i use fopen() to open files, they have the wrong user/group, and can't modify them to where i have write priveleges. I'm on linux, and recently i've moved to a local server.

$open=fopen("file.php","a");

This will open the file, and let me write to it once.(What I write to it on the starting script) But if I call an fopen() to open it in a different script, I get the error that its not a valid resource. I'm guessing the reason is there is no write permission. How can i change the user/group from 'wwwrun/www' inside the script? or maybe change something else that makes files created by an fopen command 'me/mygroup'. Can someone help?

(Showing 50 last posts, newest on top)