outline
11-14-2000, 03:07 PM
I am trying to write a script that will allow a user to upload a file, and have that file stored on the filesystem in a certain directory.
Here's what I do not want to do:
1. CHMOD the directory to 777
2. CHMOD the directory to be the user/group of APACHE
Does anyone have any ideas?[nbsp][nbsp]I thought about connecting via FTP from PHP, but PHP's FTP won't let you remove files, only open them.
I also thought about using the exec() command from PHP, but am not sure how I could do that and remove the file from the system so that ftp could come and place the file on there.
The ideal solution would be independant of FTP, and would allow me to switch user and group based on some predefined variables, then login, and overwrite the file with the new one.[nbsp][nbsp]Can this be done?[nbsp][nbsp]If not in PHP, then in PERL?[nbsp][nbsp]
Many thanks!!
Here's what I do not want to do:
1. CHMOD the directory to 777
2. CHMOD the directory to be the user/group of APACHE
Does anyone have any ideas?[nbsp][nbsp]I thought about connecting via FTP from PHP, but PHP's FTP won't let you remove files, only open them.
I also thought about using the exec() command from PHP, but am not sure how I could do that and remove the file from the system so that ftp could come and place the file on there.
The ideal solution would be independant of FTP, and would allow me to switch user and group based on some predefined variables, then login, and overwrite the file with the new one.[nbsp][nbsp]Can this be done?[nbsp][nbsp]If not in PHP, then in PERL?[nbsp][nbsp]
Many thanks!!