Re: Permissions on uploaded files (Unix)
| From: | jeremy brand | Date: | Sun, 05 Nov 2000 18:58:01 +0000 |
| Subject: | Re: Permissions on uploaded files (Unix) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23798@lists.php.net to get a copy of this message | ||
You are playing under normal UNIX rules. I'm not saying this is
ideal (because it's not) or that I recomend it (because I don't) , but
it will work. You can make the choice if you want to risk security
over what you need to accomplish.
After you upload your file, you can run the chmod() php function and
change the perms so that "other" can write to the file as well. Using
perms 0777 or 0666 will allow your webmaster (or anyone on that
system) to change those files.
Hope this helps.
-jeremy brand
_______________________________________________________________________
GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9
_ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more __
On Sun, 5 Nov 2000, Kilian wrote:
> Date: Sun, 5 Nov 2000 16:34:59 +0100
> From: Kilian <kil@bunny.ch>
> To: php-general@lists.php.net
> Subject: [PHP] Permissions on uploaded files (Unix)
>
> Hi All,
>
> I'm running Apache with PHP 3 as compiled-in module. My problem seems
> simple, though, I haven't found anything in the FAQs and other docs. When
> uploading a file with PHP, it gets owned by the user under which Apache is
> running as and the perms are 755. That means that the webmaster, which is
> ftping to the server, cannot change the file (rename, chmod, overwrite) but
> only delete it since he owns the directory to which the file is being
> uploaded.
>
> Before I'm going to write scripts to change ownership, is there an easy
> solution to this problem? If it's just a RTFM, I'd be happy to do so ;)
>
> Thanks!
>
> -- Kilian
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>