Welcome Guest, Not a member yet? Register   Sign In
Copy not working because of permissions
#1

[eluser]tommo.wilson[/eluser]
Hi all,

I have a script which loops through a large number of images and copies them to another folder. There are approximately 4000 images.

It works properly for most of them but there's about 37 of the images which give me this error.

Quote:A PHP Error was encountered

Severity: Warning

Message: copy(images/products/bpics/abs0360_mo7617.jpg) [function.copy]: failed to open stream: Permission denied

Filename: controllers/updatedb.php

Line Number: 178

What could possibly be stopping me from copying the file?

The permissions of all folders involved are 777.
The images aren't read-only
I can't see any difference between the ones which do work and the ones which dont.

Thanks for any help Smile
#2

[eluser]Eric Barnes[/eluser]
You may want to use some of these php functions to test a file that works and one that doesn't and see if you get anything different:
http://php.net/manual/en/function.fileperms.php
http://www.php.net/manual/en/function.fileowner.php
http://www.php.net/manual/en/function.stat.php




Theme © iAndrew 2016 - Forum software by © MyBB