Forum Moderators: coopster

Message Too Old, No Replies

File permissions problem in Windows 2008

         

AppAl

7:06 pm on May 20, 2009 (gmt 0)

10+ Year Member



Hello,

I'm transferring my website from Linux server to Windows Server 2008. I've done all transferring, but still have an error that I need to fix.

One of them is the problem with file permissions.

I have PHP script which:
1. Uploads file to the server (temp.jpg).
2. Creates copies of that photo file (temp-medium.jpg, temp-thumbnail.jpg etc) with ImageMagick.
3. Renames files. Script changes "temp" to user ID.

Some facts:
- PHP creates temp.jpg file without any problems
- PHP calls ImageMagick and it creates modified copies of the uploaded file without any problems
- PHP renames temp.jpg to userID-original.jpg without any problems
- I never had any problems with the script in Linux

The problem is:
- PHP gives errors when it's trying to rename files, created by ImageMagick

The errors are:
[phpBB Debug] PHP Notice: in file E:/home/re/upload.php on line 100: rename(E:/home/photo/2/temp-sq.jpg,E:/home/photo/2/1455-sq.jpg) [function.rename]: Permission denied

I've tried to give NETWORK SERVICE full access to "photo" folder and all files in it. I've also added NETWORK SERVICE in owners group of the "photo" flder.

Please tell me how to fix it.

Thanks in advance.

mvaz

12:19 pm on May 21, 2009 (gmt 0)

10+ Year Member



AppAl, Welcome!
I believe you are trying to upload to your live online server?
If that is the case, you may need to modify your upload.php script to reflect the path/folder(s) in your server not the 'E' drive which I presume is on your local machine.