A heapload of Windows 2003 Server issues and errors A heapload of Windows 2003 Server issues and errors
 

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

A heapload of Windows 2003 Server issues and errors

Started by SnitchSeeker, August 27, 2005, 05:14:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SnitchSeeker

Warning: unlink(./albums/edit/mHTTP_temp_a4402701.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453

I have Copermine 1.4.1 installed on a Windows 2003 server.

I have set user permissions to "write" on folders "album" and "includes" and have made no modifications to the code.

I have set up 3 categories and one album.

At the top of the Upload page, I get this list of errors:

Warning: unlink(./albums/edit/mHTTP_temp_bf3e074f.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453



Warning: unlink(./albums/edit/mHTTP_temp_f267204d.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453

Warning: unlink(./albums/edit/preview_08517984.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453

Warning: unlink(./albums/edit/preview_66fb2d2d.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453

Warning: unlink(./albums/edit/preview_f6f1d845.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 453

And then, under the navigation bar, I get these errors:

Notice: Undefined offset: 2 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 250

Notice: Undefined offset: 3 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 256

Notice: Undefined offset: 4 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 256

...and this is before I even try to upload anything.

When I upload a 220 kb JPEG image, I get the following errors:
Notice: Undefined variable: file_failure_array in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 1940

Notice: Undefined variable: URI_failure_array in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 1941

Notice: Undefined variable: zip_failure_array in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 1942

But it says:
Quote1 uploads were successful.

Please click 'Continue' to add the files to albums.
After clicking 'Continue' (and waiting about 4-5 minutes for the next page to load?!), I enter a title, and a description, and save, then get the following errors:

Notice: Undefined index: user1 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2146

Notice: Undefined index: user2 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2147

Notice: Undefined index: user3 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2148

Notice: Undefined index: user4 in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2149

Warning: rename(./albums/edit/mHTTP_temp_a52c3e78.jpg,albums/userpics/10001/kids_gingerbread.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2229

Warning: unlink(./albums/edit/preview_4d98d53f.jpg): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2261

Notice: Undefined variable: PIC_NEED_APPROVAL in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2269

Notice: Undefined variable: PIC_NEED_APPROVAL in c:\domains\worldofgood.net\wwwroot\design\testarena\coppermine\upload.php on line 2299

and the message:
QuoteThe previous file could not be placed.

You have successfully placed all the files.
I click 'Continue' and come to the gallery front page, but the image is nowhere to be found.

(Edited subject of thread to better define the content.)

SnitchSeeker

It seems I may have posted this in the wrong forum. Please move theis to the correct forum if I did. (Sorry but when I tried to check which version I have, it said 1.4.1, but when I look at the debug code at the bottom of my page, it says Coppermine version: 1.3.4  ???

I have searched the forums for over an hour looking for an answer, so please don't assume I just came here and posted the problem without doing my share of investigating.

Here is the entire debug code:
USER:
------------------
Array
(
    [ID] => f05a517eb59e90f6cb7ac2dcde481b7f
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => admin
    [user_password] => ********
    [user_lastvisit] => 2005-08-27 09:30:25
    [user_regdate] => 2005-08-27 03:13:13
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg134_filetypes;
    [1] => SELECT * FROM cpg134_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '15333179a32cc3d0240debbfe623886c'
    [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg134_usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  cpg134_usergroups WHERE group_id= 1
    [4] => DELETE FROM cpg134_banned WHERE expiry < '2005-08-27 10:14:05'
    [5] => SELECT * FROM cpg134_banned WHERE ip_addr='85.165.100.26' OR ip_addr='85.165.100.26' OR user_id=1
    [6] => SELECT value FROM cpg134_config WHERE name = 'theme'
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.0.21-nt-max
------------------
Coppermine version: 1.3.4
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 3.23.49
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .;c:\php4\pear | .;c:\php4\pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | postmaster@worldofgood.net | postmaster@worldofgood.net
sendmail_path | no value | no value
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.092 seconds - 7 queries in 0.006 seconds - Album set :

SnitchSeeker

After reading your upload troubleshoot guide, I saw that I should give a username and pass for a test registered user for troubleshooting.

my test gallery
And a registered user for testing:
Username: test
Password: test

Thanks for any help! I love this Gallery so far - if I could just get it to work!

(I have 4images installed at my HP site's Gallery, but we kind of hate it so we are looking for an alternative.)

DJMaze

I don't need admin access, i can tell you exactly what the problem is and it's IIS specific.

The server administrator has to setup your file permissions properly in the IIS configuration, there's nothing we can do about it other then promoting linux :P
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

SnitchSeeker

Thank you for your reply, but that doesn't help me at all.

Can somebody please tell me how I can fix this problem? I have complete access to the server as it is my own dedicated server. Obviously it is too late for me to go over to Linux or I would.

Please tell me how I can properly change the permission settings. I have assigned "User" write permissions on the folders and files I was supposed to. If I did something wrong, please tell me how to do it right rather than just say "setup your file permissions properly" as I have no idea how "proper" to do it.

Thank you! :)

(PS. again, I am the server administrator. I can't afford professional assistance with the server or I would. Thank you for your patience.)

kegobeer

IUSR_ needs read/write/execute permissions on /albums and all subdirectories and files.  Is this your personal, local webserver?  If so, then there isn't much I can tell you other than Google for help with Server 2003 and IIS6.  We aren't server experts, and although I used Server 2003 for a while on my test box, I don't know what to tell you; my setup worked without any problems so I can't walk you through troubleshooting steps.

I recommend you upload 1.3.4 to your current website in a subdirectory and test Coppermine that way (as long as that isn't the site with Server 2003.)
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

SnitchSeeker

Thanks Kegobeer, I appreciate your effort to help.

My dedicated server (not local but hosted as dedicated by theplanet.com) is the Windows 2003 server. It is the same server all my domains are hosted on, including SnitchSeeker.com and worldofgood.net

I assume the problems I have are all related to permissions so I must be doing something wrong. There are so many confusing ways to set permissions that I don't know which one I should use.

For example, I go into IIS Manager and find the folder, then right-click and select "Permissions" to get a box with choices, or I can right-click the folder and select "Properties" for a simpler box of choices. "Permissions"allows me to assign different permissions to different users, while "Properties" only allows you to assign "read", "write", etc. generally (non-specified for any user).

However, when I try to set permissions for a specific file (not a whole folder), I can only right-click and select "Properties" (no permissions option) and then check the checkbox to allow "write" - which I assume means for ALL users.

I find it very confusing. :(

Joachim Müller

Check Changing file permissions on Microsoft Internet Information Server (IIS). If you don't have the same interface, you'll have to ask your webhost for support. Tell them (as suggested by kegobeer) that the IUSR_hostname needs rwx permissions - they should know what to do then.

SnitchSeeker

Thanks GauGau. I will try doing it this way and let you know the result. :)

SnitchSeeker

Ok, I have reinstalled everything following the directions very carefully.
Now I get this error when trying to upload:

QuoteWarning: chmod(): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\cpg134\upload.php on line 1209

Was I supposed to change permissions to upload.php?

EDIT:

ANd when I press "Continue" I get this error:

QuoteWarning: chmod(): Permission denied in c:\domains\worldofgood.net\wwwroot\design\testarena\cpg134\include\picmgmt.inc.php on line 224

It looks like I have the exact same errors as before. *beep*?

I even created a new database to use so as to start completely from scratch.

THIS SUCKS!  :\'(

kegobeer

That means the CHMOD command isn't working because it doesn't have the rights to do so.  Doesn't matter anyway since Windows doesn't use CHMOD.  If the IUSR_ account has read/write/execute permissions in the directory, the files will also be given those same permissions.  Normally the CHMOD command is ignored by Windows - you can try commenting out the CHMOD command in upload.php, line 1209.  See if that helps at all.

Take a look here for Windows/CHMOD and file permissions.  It's an interesting read.
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

SnitchSeeker

Thanks Kegobeer! You guys are all so kind and helpful. I really appreciate all the attempts to help me fix this.

I finally got it to work, and to help others who may have the same problem, let me explain what I did:

First, I had to comment out the "chmod():" lines in upload.php and picmgmt.inc.php (do a search for chmod and comment out the lines).

Then, instead of creating a new user profile called IUSR_machine, and assigning it Write permissions, as instructed in this tutorial, The only way I could get it to work was to assign Modify permissions (which includes Write, but is one step higher) to User (the general profile, not specific to Web User).

Once you assign "User" Modify permissions, and tick off for "Reset permissions on all child objects and enable propagation of inheritable permissions" as instructed in this same tutorial (but for User, not for IUSR_machine) in both the "albums" and the "include" directory, then you should be all set.

At least it worked for me! :)

I suggest you update the tutorial (which was extremely useful, but perhaps outdated) to reflect these changes if possible.

I can supply screenshots if necessary.

Thanks again! :)

Joachim Müller

The tutorial doesn't say you were to create a user named "IUSR_hostname". This particular user account should already exist on all servers running IIS, it's the user the webserver service runs under. If this is not the case for you, then there's something your webhost has done to change this (which is not the standard method). The tutorial however addresses the method that is pretty standard for all users on Windows/IIS, at least those that are self-hosting. The reason why I created the tutorial was that there had been a lot of discussion about assigning full access for "everyone" to all folders, which definitely is a no-no. Other users suggested CHMODing folder on a Windows box, which simply doesn't work either.
Bottom line: although I appreciate your readiness to help and improve the tutorial, the request for change has to be turned down: the method described in the tut is correct; the method that worked for you is non-standard. Double-check if you haven't opened up your webserver against possible attacks to widely.

SnitchSeeker

Actually, the tutorial DOES say to create a user named "IUSR_hostname" (if one doesn't already exist). One didn't exist for me, but there was a user category called simply "User" which is what I was supposed to use.

I was only suggesting you update the tutorial because I figured that perhps it was valid only for older versions of IIS as mine is the latest version. But if you are confident that it is still valid, that's fine by me. I only want to help any future Windows 2003 server users to avoid having the same heartache and problems that I was having. It took me 3 install-attempts and much tweeking and troubleshooting to get it worked out.

Joachim Müller

From the tutorial
QuoteHighlight the user "Internet guest account (hostname\IUSR_hostname)
If it's not there already, use the "Add..." dialog to add this particular user
It says to add the IUSRr to the folder's permission dialog. It does not say "create a new user named IUSR_hostname and then add him".
Windows terminology: "Add" means putting something that already exists to an object. "Create" means something else - doesn't get mentioned in the tut. After all, the tutorial is meant for users who are self-hosted on a Windows box, it's not meant for people who are webhosted, as a good webhost should already have the permissions set up accordingly, or they should have docs for you regarding permissions management. Please note that I'm not particularly fond of hosting internet pages on Windows boxes (although I'm a network admin on a network with Windows-boxes mostly in real life, so I know what I'm talking about). I'm particularly not fond of self-hosting, but as there is a growing number of people who think that this would be a clever alternative for low bugets I created the tutorial.

Joachim

SnitchSeeker

Ok I see what you mean (sort of).

But since it didn't appear in my case, I clicked the "Add" button, and typed in "hostname\IUSR_hostname" in the dialogue box, and then clicked OK. I considered this as just following the tutorial, but apparantly the tutorial meant something else?

In any case, it's a good tutorial and I much appreciated it. I simply misunderstood some of the steps I guess as I am NOT a Windows person normally, but am sort of stuck with this WIndows 2003 server and am trying to make the best of it.

SnitchSeeker

BTW, should this thread status be changed to "solved"?

..or is that for something else?