IIS6, permissions, NOT WRITABLE IIS6, permissions, NOT WRITABLE
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

IIS6, permissions, NOT WRITABLE

Started by radox, May 26, 2005, 07:32:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

radox

i'm going nuts here. i keep getting "not writable" on an uploaded folder.

IUSR_hostname is set to Full Control on "albums" and all sub directories and files.

Coppermine had no problem deleting files/pics that were manually added using the browse function.
Only problems are on the uploaded folder.

is there any known IIS issue regarding this with cpg?
i added the "everyone" group and gave it Full Control also.

any help would be great.

this setup is completely self hosted: IIS6, PHP4.3.11, MySql4.1

all other functions work great!

radox


kegobeer

Don't expect an immediate response.  This isn't a help line; at least one day for a response is the norm.

IIS works great with Coppermine, as long as your server is properly configured.

I don't understand "uploaded folder".  Please clarify.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

radox

Thanks for the response.

My server is more than properly configured...I'm not a newbie my any means.

Any folder I uploaded to "albums" would display "not writable" next to the name on "batch add"
All my permissions are correct.
I've seen more than one post on this topic with no resolutions, just a lot of snippy comments from mods.

To make a long story short, I found a solutions by modifying "searchnew.php"

I changed:
if (!is_writable($dir_path))$warnings .= $lang_search_new_php['dir_ro'];

To:
if (!is_writable($dir_path))if(!chmod($dir_path, 0755))$warnings .= $lang_search_new_php['dir_ro'];

For some reason, IIS doesn't like is_writable() enough to proceed.

And Viola!

kegobeer

#4
IIS doesn't use CHMOD permissions, that's a *nix and Apache thing.  CHMOD is completely ignored on a Windows machine.  You don't get error messages anymore because !chmod will always return a false.  You would get the same result by removing that line entirely.

Unfortunately, this isn't a solution to the problem.  We have to find the reason why Windows says a folder isn't writable when you have permissions set correctly.  I never ran into this problem when I ran IIS6 on my test box.  What are your server specs?  How did you create the folder?  Locally on your machine, or did you use a FTP client?

A link that may help or shed light:
http://www.phpbuilder.com/lists/php-windows/2004022/0157.php

You may also want to Google for IIS is_writable or windows is_writable, or even ask on an IIS specific forum.  Gaugau also has a lot of IIS server knowledge; he may be able to help on this.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

Quote from: radox on May 27, 2005, 05:22:19 AM
My server is more than properly configured...I'm not a newbie my any means.
On the other thread you talked about CHMOD settings, although on this thread you say you're running IIS. As kegobeer already pointed out: there's no such thing on Windows boxes. You have to explicitely set permissions for the IUSR, see http://coppermine.sourceforge.net/tutorial/permissions/iis.php
If you still can't get it to work, comment out the writable check instead of doing funny chmod checking on a Windows box.

radox

thanks for the comments guys. it's a really weird behavior. IUSR_ is setup with full control on the "albums" and "include" directories per your instructions. IUSR_ also has full rx on my PHP directory. i'll comment the line later tonight to verify...

does coppermine use cmd.exe or any other windows specific executable?

i would love to figure this out...

it's definetly not a persmissions issue on my wwwroot or php directories...somewhere else...maybe

donnoman

You mention IIS6 which means your on Windows 2003.

Windows 2003 has some peculiar permissions that you have to look for on a default install on IIS.

Make sure on your writeable directories, when you go into "advanced" permission that there is NOT a deny on the "write" rights for iuser or guest.

This is usually inherited from the inetpub directory. To fix it for the folder that needs write rights, in "advanced" uncheck "inherit permissions" it will prompt you with a box to either start from scratch or make a copy of the current rights, make a copy.  Then remove the deny entries.

Deny trumps all other rights, even if you gave IUSER full control, the presence of a deny on the "write" right, would prevent you from being able to write to that directory.

radox

About the only thing I hate on windows is the overly complicated permissions structure....too many variables.

Up until now, I was just dragging files from my local machine into a mapped server drive.
I think local groups were getting crossed with server groups and causing errors.
I have been doing all my troubleshooting on the local domain...until today.
When I FTP into the server...no problems at all.
I did some remote debbugging and things worked great.

Thanks for all your help guys.

Great Gallery! Keep up the good work!

kegobeer

So, problem solved?  Can you post exactly what you had to change in case someone else has this problem?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots