Re: Uploading files / processing with a PHP script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 08 October 2006 13:25, Stut wrote:

> > the owner of the file is 'www'.  Is there any way I am able to
> > automatically change the owner of the file to my FTP login identity (for
> > example 'rpiggott')
>
> As far as I am aware only the root user can change the owner of files.
> You could set up a very specific sudo command to allow the www user to
> chown files to rpiggott but that's beyond the scope of this mailing list
> (plus I'd have to look it up and you can do that just as well as I can).
> Of course that would need you to have root on the server in the first
> place.
>
> -Stut

The owner of a file can change ownership of the file, too, I believe, 
essentially "willing" it to someone else.  Of course, that means your web 
scripts can't access the file, either.  

A better solution is to set the file's group permissions to 7, then chown the 
file to apache:mygroup, then put both apache and your ftp user into the 
mygroup group.  

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux