What I don't understand is how can your webserver create a file and then not to have permission to read it. What is your setup?
Jaski wrote: > No Edwin .. I can't do any thing to that file .. not even from my ftp > client .. can't download can't change permissions .. > > The server is managed by rackspace .. I doubt they would do some thing > like running apache as root which I "hear" is a v foolish thing to do > (frankly I don't know how to figure it out myself ..if that is the > case .. phpinfo() did not say any thing on that.) > > A brief restatement of problem > > File uploaded via HTTP POST to /tmp OK > > After this I tried the following three things and none worked. > > a) fopen("/tmp/temp_file_name","rb") FAILED (Operation not permitted) > b) copy($tempfile, "/place/to/put/uploaded/file") FAILED > c) move_uploaded_file($userfile, "/place/to/put/uploaded/file") DID > COPY BUT file had -rw-------- permissions, and could not open this > file either... so back to square 1 > > The directory in "/place/to/put/uploaded/file is mode 777 . > > > Still fighting it out. > Regards > Jaski > > > > On Tue, 24 Sep 2002 @ Edwin wrote : > >> Just a comment... >> >> On Tuesday, September 24, 2002 1:39 PM >> Jaski wrote: >> <snip> >> > I tried to copy this file using >> > move_uploaded_file($userfile, "/place/to/put/uploaded/file"); >> > >> > and here a strange thing happened. The file was successfully >> > copied BUT it had permissions like -rw------ which I interpret as >> > only accessible to root. I tried copy() function instead and it >> > failed. >> > >> >> ...having that "permission" doesn't necessarily mean that it's only >> accessible to root--unless of course you're running Apache as root, >> which I >> doubt you'd do. >> >> Anyway, if the file was successfully copied why not just try to open it >> there? >> >> - E > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php