Subject:
|
Re: PHP help...
|
Newsgroups:
|
lugnet.off-topic.geek
|
Date:
|
Mon, 23 Jul 2001 16:45:17 GMT
|
Viewed:
|
168 times
|
| |
| |
On Mon, Jul 23, 2001 at 04:33:49PM +0000, Bram Lambrecht wrote:
> Hi all,
> I need to be able to write files (for example, thumbnail images) to a
> directory using a PHP script. The problem is I'd rather not give world
> write access to the thumbnail directory. Is there a way I can change users
> inside the PHP script so that it can change to a user with write access or
> so that chmod doesn't give me a no permission error? Is there some other
> way I can accomplish the same thing? (Kevin, I suppose you have dealt with
> this issue on Brickshelf?) If I can't use PHP, what can I use?
> Thanks for the help!
what you need to do is set either the owner or the group of the
directory to the webserver's user (nobody, www, apache, whatever). Once
that is done, you can give permissions to the server to write to the
directory.
In general, no user can "switch users" except root. and no sane
webserver runs as root. There are ways around this problem, with
modules like "suexec", but I never tried any of those.
Does that help?
--
Dan Boger
dan@peeron.com
|
|
Message has 1 Reply:
Message is in Reply To:
| | PHP help...
|
| Hi all, I need to be able to write files (for example, thumbnail images) to a directory using a PHP script. The problem is I'd rather not give world write access to the thumbnail directory. Is there a way I can change users inside the PHP script so (...) (23 years ago, 23-Jul-01, to lugnet.off-topic.geek)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|