> Dear Sir, > > I had written a small code in php to copy a file, its as follows > > <? > copy('/etc/test1.txt','/tmp/test.txt'); > ?> > > I had named the file as cp.php. > > > The problem is when i open the file in my browser(Mozilla),it issues > a warning as follows > > Warning: copy(/etc/test1.txt): failed to open stream: Permission > denied in /var/www/html/cp.php on line 2.
The user who runs the script (the same who runs Apache) don't have the rights to read it. > i had issued all permissions to that file, but still it doesn't work. What did you do exactly? Brice Favre. > > but when i run the same code from the command prompt by issusing as > command "php cp.php" > it works fine. > > > Please help me.