SuperBlue Posted February 4, 2010 Share Posted February 4, 2010 How do you change the permissions so that uploaded files can be viewed in their default apps? I got a problem with a PHP upload script, where windows doesn't allow me to access the uploaded files. Its likely some NTFS crap or the like, not something I'm to happy about getting into. Requesting the file from the browser works, so that must mean Apache has the necessary permissions to read the file. Do i need to set the permissions for the uploaded file from within the script, or do i need to alter a setting in Windows somewhere? I prefer the latter, because i normally only use this for development. Quote Link to comment https://forums.phpfreaks.com/topic/190892-permissions-for-files-uploaded-through-php-in-windows/ Share on other sites More sharing options...
oni-kun Posted February 4, 2010 Share Posted February 4, 2010 How do you change the permissions so that uploaded files can be viewed in their default apps? I got a problem with a PHP upload script, where windows doesn't allow me to access the uploaded files. Its likely some NTFS crap or the like, not something I'm to happy about getting into. Requesting the file from the browser works, so that must mean Apache has the necessary permissions to read the file. Do i need to set the permissions for the uploaded file from within the script, or do i need to alter a setting in Windows somewhere? I prefer the latter, because i normally only use this for development. You dont need to do chmod on windows. Its non essiential. "where windows doesn't allow me to access the uploaded files." Are you running as administrator? Apache has it's own pseudo-permission setup, albeit it shouldn't matter. Quote Link to comment https://forums.phpfreaks.com/topic/190892-permissions-for-files-uploaded-through-php-in-windows/#findComment-1006653 Share on other sites More sharing options...
SuperBlue Posted February 4, 2010 Author Share Posted February 4, 2010 If i check the security settings of the file, then i got the following listed. SYSTEM UserName/Administrator Both of which have full access, the second is the user I'm logged in with, which dose have Administrator rights. If i copy the file, (which solves the problem), and look on the same settings, then i got a few more listed. SYSTEM UserName/AccountName UserName/Administrator UserName/Users Its likely because PHP doesn't add these two by default. Adding the UserName/AccountName seems to solve the problem, i would just hate to do this manually for every file i upload. What I'm looking for is to allow access by default. Quote Link to comment https://forums.phpfreaks.com/topic/190892-permissions-for-files-uploaded-through-php-in-windows/#findComment-1006668 Share on other sites More sharing options...
SuperBlue Posted February 4, 2010 Author Share Posted February 4, 2010 Ok i don't know why, but now the problem disappeared, thanks for your time. All i did was to manually add my user account, give it the necessary permissions, and now it seems that it works with all uploaded files. Quote Link to comment https://forums.phpfreaks.com/topic/190892-permissions-for-files-uploaded-through-php-in-windows/#findComment-1006754 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.