I am running a dedicated server (managed) Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7, a client wants to move his ftp application (php scripts) over from the server it runs on to mine (he already has a site on my personal server and likes the speed from the data centre which he hasn’t got where the ftp site is at the moment) so to make sure the ftp image site works (which it should and does, well nearly) I moved an ftp application over to check it all goes well… the only problem I have is that one of the php scripts use the following 3 lines:
// code, code.....
chown($path_la, "apache");
chgrp($path_la, "apache");
chmod($path_la, 0777);
// code, code...
what happens is the guy would create an account ‘and directory for that account’ from the ftp admin page, upload the image folders and images to the directory that he created using the ftp admin page and then presses a ‘Generate’ button that runs the script that changes the ownership of the uploaded folders and their images (along with a few other things)… on my server these all throw errors… because the php script cannot run these commands. I tried changing the scripts user and group to root, apache and nobody but no joy…
From what I can see the reason these commands need to be run is because when the client uploads the folder and files with Filezilla the various folders and images end up with an ownership id of 99 (99 is ‘nobody’ in the /etc/groups file), when the images are loaded on the preview page they cannot be seen while the owner and group is ‘nobody’.
BTW, when I uploaded the site, files, folders and their images with Interarchy these all ended up with the owner and group as the account ‘user’, this seems fine… when the images are previewed I can see them, seems to be when the client uploads the owner and group are set to ‘nobody’.
I seem to be having problems understanding what I need to do here so the script can run these three commands, unix servers are not something I know much about and anything I have found doesn’t actually explain how to set things up so these commands can be run although I know why they cannot be run, it’s understanding what changes I need to make to the server account to allow these commands to be run is what is tripping me up. I can chown and chmod from a command line but of course this needs to be done from the script that is run when the user presses the ‘Generate’ button on the admin page after he image folders and images have been uploaded.
If someone understands what needs to be done here I would love them to jump in and point me to what I need to do on the server to get this script with these commands to run.
Thanks
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options