Re: Users/permissions/files - LAMP



Yeah, it would have to be owned by the apache user since I'm assuming you're
going to upload the files through the web as well. Apache will need to have
write access to it. I don't think any other user should have access to it at
all

To upload the files you'd just use move_uploaded_file().
http://www.php.net/manual/en/features.file-upload.php

B

>
> Interesting. That's a good idea. Would this directory off the
> web-root be owned by the apache user/group? (Doesn't the PHP script
> run as the apache user?) Cause if the files were just world-readable,
> I would have to figure a way to get the files there after uploading in
> the first place, which presumably could just be a perl script or
> something run as the owner of the directory.
>
> Thanks for the idea,
> jab3
>


.



Relevant Pages

  • Re: imagejpg & safe mode & chmod() and uploads
    ... In a restricted area I let a user upload an image, ... But the same script is also refused chmod.... ... file uploaded will be owned by the Apache user. ...
    (comp.lang.php)
  • Re: File permissions for a wiki-like site
    ... I'm writing a site where a handful of people will be able to edit ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ...
    (comp.lang.php)
  • Re: Cannot delete files created by PHP
    ... owned by the Apache user, usually something like apache or www or ... nobody. ... You could always write a PHP script to delete the stuff you ... as it will run with the same permissions as the ...
    (comp.lang.php)