I have the following problem:
For my system I need write-access to every file on the server. As they are in many directories and subdirs it would be horrible for the user to change all these attributes manually.
I imagine a php script which connects to the FTP-Server and recursively goes through the directory tree and changes all the attributes to the desired value.
But: I don't have an idea how to do this. Perhaps you could help me!
Is your server unix? if so it may be easier to create a directory listing vis readdir see www.php.net/readdir and then use some basic unix commands to change the permissions for you,
<?exec("chmod 777 *.*");?> would chmod all the files in the current directory to 777
not that I would recommend doing this anyway!, perhaps better to check if someone is authorised to modify a file then change the permissions on just that file and change them back after they have done whatever they have to do, via script as above.
This doesn't work because the apache webserver runs under the UNIX account "anonymous". But the creator of the files is my ftp-account called ftpXYZ, so the webserver can't change the file attributes because it isn't the creator of the files.
With files created by the system this works fine, but not with uploaded files.
Thanks for your reply, either.