Re: Re: #18293 - mkdir()

From: Date: Fri, 03 Jan 2003 13:55:20 +0000
Subject: Re: Re: #18293 - mkdir()
References: 1 2 3 4 5 6 7  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350595@lists.php.net to get a copy of this message
Gabor Hojtsy <gabor@hojtsy.hu> wrote: >> >> 0777 is fine for WIN32. >> > >> > Well, this is not too scientific. The user notes indicate on that >> > page, that the read/write permissions can actually be set... >> >> Which user note is that? I can't find one saying that the permissions >> work on Win32. And in virtual_mkdir() in tsrm_virtual_cwd.c I see: >> >> #ifdef TSRM_WIN32 >> retval = mkdir(new_state.cwd); >> #else >> retval = mkdir(new_state.cwd, mode); >> #endif >> >> So perhaps the manual should state that the second parameter of PHP's >> mkdir is ignored on Win32? >> >> To open another can of worms: the chmod manual page is also not very >> specific about the modes - and as I understand, you can have at least >> read-only files on Windows. > > First of all, I must admit I never checked anything different than 0777 > on windows ;) If you still have access to a Windows box with PHP, can you test some other cases? > There is more than one user note stating that the permissions work on > some level though. One example: > > | It does work on Windows. > | I use Win 98 with the Sambar Server. > | The only chmods allowed are the 775 and 666 mod. 775 for non-writeable > | and 666 for writeable. The only thing is that the usergroups doesn't > | work. Umm, that's on the chmod page, not on the mkdir page. I was refering to the mkdir function; sorry if that wasn't clear enough. > The number examples are pretty dumb, but the user says it worked for > him... BTW if the code says, it is ignored on windows, then it should > be documented as is, and the notes should be removed. It is possible > that it was supported in a previous version of PHP maybe... For chmod it is not ignored - only for mkdir (but yes, it should be documented there). Giving Windows developers a chance to not let their scripts break on Unix is a good thing, but first of all it should be documented how they can use these modes on their own platform, I guess. Regards... Michael

« previous php.doc (#969350595) next »