To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 3214
3213  |  3215
Subject: 
Re: PHP help...
Newsgroups: 
lugnet.off-topic.geek
Date: 
Mon, 23 Jul 2001 16:45:17 GMT
Viewed: 
156 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:
  Re: PHP help...
 
(...) Yes it does! Now how do run chgrp without telnet... --Bram Bram Lambrecht bram@cwru.edu (URL) (23 years ago, 23-Jul-01, to lugnet.off-topic.geek)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR