[FX.php List] [OFF] Windows Temp permissions for uploading
Tim 'Webko' Booth
tim.webko at gmail.com
Mon Nov 17 20:13:20 MST 2014
Ive found if you have an FTP server (FileZilla for example) running with
access to the web directories under IIS, you can chmod using that... It
interprets that to whatever Windows needs
On 18 November 2014 14:07, Joel Shapiro <mail at jsfmp.com> wrote:
> Hi Beverly
> Thanks for the reply!
> chmod(), I have learned, is a Unix (& Linux) function and does not work on
> Further down the page I'd linked to was a comment that using copy()
> instead of move_uploaded_file() will use the target directory's
> permissions, and this has worked for my situation. A potential risk is
> that copy() will overwrite same-named files while move_uploaded_file()
> won't. That probably won't be an issue for me since I'm deleting the file
> (via unlink() ) after I InsertFromURL it into an FM container field.
> And/or maybe I can temporarily modify the file name &/or additional folder
> with something unique to remove any possibility of unwanted overwriting.
> (And I'll probably still play around with permissions anyway to see if I
> can make it work as it's "supposed to")
> On Nov 17, 2014, at 6:03 PM, BEVERLY VOTH <beverlyvoth at gmail.com> wrote:
> > I haven't read the entire article. Does chmod() help?
> > <http://php.net/manual/en/function.chmod.php>
> > (I got there from here: <
> > Beverly
> > On Nov 17, 2014, at 7:56 PM, Joel Shapiro <mail at jsfmp.com> wrote:
> >> Hi all
> >> I've got a situation. I'm uploading files via PHP to a Windows Server
> 2008 (IIS7). The file is successfully uploading to C:\Windows\Temp and
> then successfully moving to an "uploads/" directory inside the site.
> However, there's some kind of permissions problem on the file inside
> >> If I point my browser to the uploaded file ("
> xyz.com/uploads/myFile.docx"), I get a "401 - Unauthorized: Access is
> denied due to invalid credentials." error.
> >> If I manually move the same myFile.docx into the /uploads/ folder (via
> my Mac's Finder, not uploaded via PHP), then pointing to the file's URL (as
> above) successfully downloads the file.
> >> This post:
> >> *seems* like it should address this issue: "... The problem is when
> Windows copies that file, it keeps the temporary directory’s permissions
> and doesn’t inherit your web directory’s permissions." But setting most of
> the existing Windows accounts/objects in Windows\Temp to Full Control
> doesn't fix the problem.
> >> FWIW: This works fine on my Mac dev server.
> >> Does anybody have any thoughts/suggestions? Is there a specific
> account/object in C:\Windows\Temp that should be set a specific way?
> >> TIA,
> >> -Joel
> >> _______________________________________________
> >> FX.php_List mailing list
> >> FX.php_List at mail.iviking.org
> >> http://www.iviking.org/mailman/listinfo/fx.php_list
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FX.php_List