Re: change user after uploading file using a form

From: Date: Wed, 22 Aug 2001 00:48:00 +0000
Subject: Re: change user after uploading file using a form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63829@lists.php.net to get a copy of this message
> I'm using the form file object for uploading a file because php using ftp > isn't supported on my provider but everthing ok so far. > > Now the http user (lets say the user that php is running on) is owner of the > file, I want to change this to the user I am (the ftp user) > hosting is running linux and I'm a real user there. > > is it possible to change user ? You can try: http://php.net/chown http://php.net/chmod http://php.net/umask and various other functions that accept a permissions argument (fopen?) and see if any of them will let you do this... Probably not, since then *ANY* PHP-scripter on your server could hijack your account, and that would be bad, eh? What your IPS *MIGHT* do is create a GROUP with you and nobody user in it, and you *MIGHT* be able to chgrp the file to that group, and you *might* be able to do what you need to do with that file then... -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#63829) next »