Im attempting to you use Copy() to copy a folder and its files to another folder on the server. The problem is that the Userid is 99, which is PHP's file ownership number, how can I copy the files and folder with my user ownership number/name.
You cannot copy folders with copy() alone. But there are some samples in the user comments on the copy() manual page, on how to copy folders.
nico, im using a function on that page to recursively move a folder and all of its files. Its moving them correctly but using PHP's userid and groupid which is not allowing me to move/delete them via FTP.
LazyD: just to be absolutely clear, it's not PHP's user ID, it's 'nobody' (which is the user that runs Apache). You need to run chown and chgrp on the files after copying them... there's really no 'automatic' way of doing it I'm afraid.
If chown / chgrp will not work, this can be solved by assigning permissions to files/directories that allows access for other groups. Just set chmod for every file to 666 or 777 after copying.