php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29355 file copy error
Submitted: 2004-07-23 19:01 UTC Modified: 2004-12-15 04:06 UTC
From: master at oscontract dot com Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2004-07-23 19:01 UTC] master at oscontract dot com
Description:
------------
I was uploading files to my domain from my harddisk.
Everything was working fine.
But when the directory reached 1032 files, I started having problems, Iam unable to upload further files from harddisk, it returns the following error.

" failed to open stream: Permission denied "

though it was working fine, and I created few test dir and it uploads fine.
Could this error be because of number of files that can be stored in a dir is 1032 the max number of files that can be stored in a dir ?

Reproduce code:
---------------
copy("cpics/testdir/wal3.jpg","cpics/b1456/wal3.jpg");


Expected result:
----------------
it should copy a file from one folder to another folder, the destination folder already has 1032 files, it is not accepting any ore.

Actual result:
--------------
The result is the error 
Warning: copy(cpics/b1456/wal3.jpg): failed to open stream: Permission denied 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-29 14:13 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

How can we reproduce it? Can you provide a short example?
 [2004-07-29 14:21 UTC] master at oscontract dot com
<?php

copy("cpics/testdir/wal3.jpg","cpics/b1456/wal3.jpg");

?>

Just a line that is all.

There are about 50 directories in the cpics directory.
One of the directory 'b1456' has 1032 image files, rest other directories have about 100 to 50 images.
Now this dir:b1456 is where am unable to upload any further files.

Rest other directories are fine and am able to use the above script.

Can a directory not store more than 1032 files ?
Let me know if you need any further details.
 [2004-07-29 14:23 UTC] tony2001@php.net
You can test it yourself: write a script, that will create 1033 files in a directory and you'll see the answer.

 [2004-07-29 14:27 UTC] master at oscontract dot com
Yes I did test the same in my windows system and it works fine, but this error with my remote server which is running on Linux.
I thought may be this is a bug in php or may be I have to alter the php settings.
Let me know if you have any solution to this.
 [2004-08-05 18:51 UTC] master at oscontract dot com
So were you able to fix this problem?
 [2004-12-15 04:06 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 17:01:30 2024 UTC