Re: chown / chgrp of a http owned file after upload
| From: | Mike Migurski | Date: | Wed, 06 Aug 2003 17:23:23 +0000 |
| Subject: | Re: chown / chgrp of a http owned file after upload | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158519@lists.php.net to get a copy of this message | ||
>I have written as part of my CMS, an image upload system, now when the
>images are placed in the destination folder, they are owned by httpd.root
>and I need to get them to be owned by siteuser.sitegroup.
>
>I have tried to chmod and chgrp it to siteuser.sitegroup but it gives
>permission denied errors.
>
>Is there any way round this without enabling run as root? Or is there a
>safe way to do this?
You can ch(mod|own|grp) the files in the upload script, right after they
are written to disk. chmod a+rwX is a good option if you are not overly
concerned about the security of these files. Are you getting
permission-denied errors when attempting to do this in your script, or
afterwards, on the command-line?
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html