Re: [PHP] chown/chgrp not working

2001-11-30 Thread Fred

I tackled a similar problem by running a root cron job that does the chown
and chgrp every x minutes.

Fred

Paul Warner <[EMAIL PROTECTED]> wrote in message
023601c179b6$a35bdd80$[EMAIL PROTECTED]">news:023601c179b6$a35bdd80$[EMAIL PROTECTED]...
> Ahh, it is not running with root priv., so this is the problem.  Sounds
like
> a good time to look
> for another way to skin this cat...
>
> Thanks!
>
> -- Paul
>
>
> - Original Message -
> From: "Darren Gamble" <[EMAIL PROTECTED]>
> To: "'Paul Warner'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Friday, November 30, 2001 10:21 AM
> Subject: RE: [PHP] chown/chgrp not working
>
>
> > Good day,
> >
> > What user is the application running as?  Only the superuser can use
these
> > functions (this is documented with both of these functions).
> >
> > For security reasons, you may want to use an external sudo script to
> > accomplish this.  Be very, very careful...
> >
> > 
> > Darren Gamble
> > Planner, Regional Services
> > Shaw Cablesystems GP
> > 630 - 3rd Avenue SW
> > Calgary, Alberta, Canada
> > T2P 4L4
> > (403) 781-4948
> >
> >
> > -Original Message-
> > From: Paul Warner [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 30, 2001 8:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] chown/chgrp not working
> >
> >
> > I have a client that I made a image uploader/thumbnailer for
> > that insists on using FrontPage.  In order to make FP
> > happy, I need to set the owner to 'nobody' and the group
> > to 'site3' which are uid 99 and gid 117.  The uploaded file
> > is set as httpd/root and the thumbnail created by the script
> > comes out httpd/site3.
> >
> > First I tried:
> >
> >  chown($file_name, 99);
> >  chgrp($file_name, 117);
> >
> > Next I tried:
> >
> >  chown($file_name, '99');
> >  chgrp($file_name, '117');
> >
> > This fails to get the uid or gid, so the first syntax appears
> > to be correct.
> >
> > Finally I tried:
> >
> >  chown($file_name, 'nobody');
> >  chgrp($file_name, 'site3');
> >
> > Error message for first and third attempts is identical:
> >
> > Warning: chown failed: Operation not permitted in
> > /home/sites/site3/web/dev/maintenance.php on line 191
> >
> > Why is it 'not permitted' and how do I allow it?
> >
> > -- Paul
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] chown/chgrp not working

2001-11-30 Thread Paul Warner

Ahh, it is not running with root priv., so this is the problem.  Sounds like
a good time to look
for another way to skin this cat...

Thanks!

-- Paul


- Original Message -
From: "Darren Gamble" <[EMAIL PROTECTED]>
To: "'Paul Warner'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 10:21 AM
Subject: RE: [PHP] chown/chgrp not working


> Good day,
>
> What user is the application running as?  Only the superuser can use these
> functions (this is documented with both of these functions).
>
> For security reasons, you may want to use an external sudo script to
> accomplish this.  Be very, very careful...
>
> 
> Darren Gamble
> Planner, Regional Services
> Shaw Cablesystems GP
> 630 - 3rd Avenue SW
> Calgary, Alberta, Canada
> T2P 4L4
> (403) 781-4948
>
>
> -Original Message-
> From: Paul Warner [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 30, 2001 8:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] chown/chgrp not working
>
>
> I have a client that I made a image uploader/thumbnailer for
> that insists on using FrontPage.  In order to make FP
> happy, I need to set the owner to 'nobody' and the group
> to 'site3' which are uid 99 and gid 117.  The uploaded file
> is set as httpd/root and the thumbnail created by the script
> comes out httpd/site3.
>
> First I tried:
>
>  chown($file_name, 99);
>  chgrp($file_name, 117);
>
> Next I tried:
>
>  chown($file_name, '99');
>  chgrp($file_name, '117');
>
> This fails to get the uid or gid, so the first syntax appears
> to be correct.
>
> Finally I tried:
>
>  chown($file_name, 'nobody');
>  chgrp($file_name, 'site3');
>
> Error message for first and third attempts is identical:
>
> Warning: chown failed: Operation not permitted in
> /home/sites/site3/web/dev/maintenance.php on line 191
>
> Why is it 'not permitted' and how do I allow it?
>
> -- Paul
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] chown/chgrp not working

2001-11-30 Thread Darren Gamble

Good day,

What user is the application running as?  Only the superuser can use these
functions (this is documented with both of these functions).

For security reasons, you may want to use an external sudo script to
accomplish this.  Be very, very careful...


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Paul Warner [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 8:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] chown/chgrp not working


I have a client that I made a image uploader/thumbnailer for
that insists on using FrontPage.  In order to make FP
happy, I need to set the owner to 'nobody' and the group
to 'site3' which are uid 99 and gid 117.  The uploaded file
is set as httpd/root and the thumbnail created by the script
comes out httpd/site3.

First I tried:

 chown($file_name, 99);
 chgrp($file_name, 117);

Next I tried:

 chown($file_name, '99');
 chgrp($file_name, '117');

This fails to get the uid or gid, so the first syntax appears
to be correct.

Finally I tried:

 chown($file_name, 'nobody');
 chgrp($file_name, 'site3');

Error message for first and third attempts is identical:

Warning: chown failed: Operation not permitted in
/home/sites/site3/web/dev/maintenance.php on line 191

Why is it 'not permitted' and how do I allow it?

-- Paul


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] chown/chgrp not working

2001-11-30 Thread Paul Warner

I have a client that I made a image uploader/thumbnailer for
that insists on using FrontPage.  In order to make FP
happy, I need to set the owner to 'nobody' and the group
to 'site3' which are uid 99 and gid 117.  The uploaded file
is set as httpd/root and the thumbnail created by the script
comes out httpd/site3.

First I tried:

 chown($file_name, 99);
 chgrp($file_name, 117);

Next I tried:

 chown($file_name, '99');
 chgrp($file_name, '117');

This fails to get the uid or gid, so the first syntax appears
to be correct.

Finally I tried:

 chown($file_name, 'nobody');
 chgrp($file_name, 'site3');

Error message for first and third attempts is identical:

Warning: chown failed: Operation not permitted in
/home/sites/site3/web/dev/maintenance.php on line 191

Why is it 'not permitted' and how do I allow it?

-- Paul


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]