Directory ownership/dynamic removal or movement of uploaded content.

From: Date: Mon, 27 Nov 2000 01:15:40 +0000
Subject: Directory ownership/dynamic removal or movement of uploaded content.
Groups: php.general 
Request: Send a blank email to php-general+get-27286@lists.php.net to get a copy of this message
No luck trying to dynamically create and recursively remove directories in php PHP creates these new directories with the chmod I want, and umask too I think, but I am not the owner, and hence can not mpdify via telnet, ftp, or through php.. HELP Here is the message going back and forth with my webhosts tech support. Thanks for getting back so quickly, If Umask and chmod are permissions - how would I change ownership? I think the ownership might be root -in which case I couldn't change it - because the php program itself created the files.... Does this sound right? So how would I change the ownership? on 11/25/00 6:29 AM, Sun Lee at wrote: > Hello Customer, > > I think the problem is not the permission but the ownership of the file. If > you > can set the ownership correctly, you will be able to delete the subdirectories > with no problem. > > > > >> In my account I am using a script to try and dynamically create >> and remove whole directories and their contents.... >> I can create the directory, but obviosuly not with the correct permissons. >> >> I need to erase this directory, (and can not) /HTML/i/ >> >> Then I need to make sure I don't create new ones with the wrong permisions. >> >> Here is the code I currently use... >> >> <? >> //This code takes an uploaded file and puts it in a new directory with the >> //directory title being the day's date.... >> >> // date as directory title >> $info_date = date("Ymd_H_i_s"); >> $path = "/HTML/i/$info_date"; >> >> >> $oldumask = umask(); >> umask(002); >> mkdir($path,0777); //should create chmod drwxrwxr-x -rwxrwxr-x for the file >> >> >> >> //then copy file to that directory >> >> copy($userfile, "/HTML/i/$info_date/$userfile_name"); >> >> umask($oldumask); >> ?> >> >> >> then I can't modify anything in those direcotries __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com

« previous php.general (#27286) next »