Notas del Terrible
Terrible Bore

IIS7 and WordPress uploaded files

December 20, 2009 21:33 by terR0Q

Recently I solved some problem with WordPress under windows hosting.

Symptoms

When we upload some file, some picture for instance, that goes to wp-content/upload folder everything works ok, picture is resized, and nothing fails. But then we try to open that file from server using direct link and get error 500.

Cause and fix

I found that all uploaded files had IUSR (used by PHP) account among others witch access granted whilst Network Service (IIS uses this account) had no access to these files. That was strange, ‘cause all image previews have correct access list that is inherited from folder as should any file created there.

But the very reason is that PHP uses temporary folder for uploaded files and copies them to destination upon success. This transit folder is set in php.ini (upload_tmp_dir setting) and by default that is C:\Windows\Temp. When files are copied in NTFS, ACL is being copied with them. Network Service account had no access to Temp directory and as a result had no access to all files transferred through it.


So fix is easy: give Network Service all grants necessary in directory set as upload_tmp_dir.


Tags: , ,
Categories: Settings | Web
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Photos

April 24, 2008 02:33 by terR0Q

Most people are too much concerned of themselves, that's the nature. So many photos — with valued moments and loved faces — are taken to keep something that will go away or had never existed even the moment the shot was taken.

Some moments are polished to seem idealistic, some cover things that should not come up. Some pretend to be artistic with some deep feeling. And just the least of photos is endowed with immaterial energy of life.


Tags: ,
Categories: Web
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

MU Blogs

April 22, 2008 00:03 by terR0Q

Old but still actual overview of multi-user blog platforms. I came upon that article just at the time I found BlogEngine.NET


Tags: , , ,
Categories: Web
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed
 
MapYourVisitors.COM