Re: [PHP] chown(), chgrp()

2006-09-22 Thread Richard Lynch
775 needs to be 0775 for starters, as I recall... On Tue, September 19, 2006 11:07 am, Rahul S. Johari wrote: > > Here's the interesting things. I did exactly that to begin with... And > I > never got the "file can't be chmoded!" ... Instead, I actually got the > "Mode > changed to" notification

Re: [PHP] chown(), chgrp()

2006-09-19 Thread Børge Holen
On Tuesday 19 September 2006 22:22, Rahul S. Johari wrote: > Ok, my code follows. Basically I'm printing ... > my Owner/Group, the existing Owner/Group of the file, the Owner/Group of > the file After trying to change it. Does apache have write access to write to yer file, that goes for either o+r

Re: [PHP] chown(), chgrp()

2006-09-19 Thread Rahul S. Johari
Ok, my code follows. Basically I'm printing ... my Owner/Group, the existing Owner/Group of the file, the Owner/Group of the file After trying to change it. The most interesting thing is... I get absolutely no errors, no warnings, and everything prints out as if everything worked... Except that it

Re: [PHP] chown(), chgrp()

2006-09-19 Thread Steve Edberg
At 11:01 AM -0400 9/19/06, Rahul S. Johari wrote: Is there a way to find out if a file can be chown'd or chgrp'd ? Something like is_writeable() ... Except that you're trying to find out if you can change the Owner or Group of a file. fileperms() perhaps? http://php.he.net/manual/en/f

Re: [PHP] chown(), chgrp()

2006-09-19 Thread Rahul S. Johari
Here's the interesting things. I did exactly that to begin with... And I never got the "file can't be chmoded!" ... Instead, I actually got the "Mode changed to" notification that I had set in the "else {" case. However... The mode of the file never changed! Even though !chmod didn't say that mode

Re: [PHP] chown(), chgrp()

2006-09-19 Thread John Nichel
Rahul S. Johari wrote: Is there a way to find out if a file can be chown¹d or chgrp¹d ? Something like is_writeable() ... Except that you¹re trying to find out if you can change the Owner or Group of a file. Who will say it first? http://www.php.net/manual/en/function.fileowner.php -- John C

[PHP] chown(), chgrp()

2006-09-19 Thread Rahul S. Johari
Is there a way to find out if a file can be chown¹d or chgrp¹d ? Something like is_writeable() ... Except that you¹re trying to find out if you can change the Owner or Group of a file. Rahul S. Johari Supervisor, Internet & Administration Informed Marketing Services Inc. 500 Federal Street, Suite

Re: [PHP] chown function

2005-10-14 Thread Daniele Palumbo
Alle 17:25, giovedì 13 ottobre 2005, John Nichel ha scritto: > nobody:nobody. nobody:nonexistant (random number abs() really high), at least for apache2. my personal suggestion is: - chown all files (avoid suid) and dir root - chgrp apache all files and dir - chmod 750 all dir, 640 all files - ch

Re: [PHP] chown function

2005-10-13 Thread John Nichel
Scott Fletcher wrote: Well, apache use the "nobody:nobody" permission... Apache runs whatever you configure user:group to be. Default is nobody:nobody. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] chown function

2005-10-13 Thread Scott Fletcher
t, that apache on > my server does not have chown permissions. > > Thank you very mych for your help. > > > Keith > > - Original Message - > From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]> > To: > Sent: Monday, October 03, 2005 11:27 PM

Re: [PHP] chown function

2005-10-10 Thread Richard Lynch
On Tue, October 4, 2005 12:21 am, Keith Spiller wrote: > chown("$endpath", "admin"); > > to try to change the owner of directories after using mkdir() > to create them. It continues to fail on my remote Fedora server. > > I know the path is correct because mkdir() works perfectly. > Apache sets th

Re: [PHP] chown function

2005-10-03 Thread Keith Spiller
tober 03, 2005 11:27 PM Subject: Re: [PHP] chown function Keith Spiller wrote: I'm using: chown("$endpath", "admin"); to try to change the owner of directories after using mkdir() to create them. It continues to fail on my remote Fedora server. With what error me

Re: [PHP] chown function

2005-10-03 Thread Jasper Bryant-Greene
Keith Spiller wrote: I'm using: chown("$endpath", "admin"); to try to change the owner of directories after using mkdir() to create them. It continues to fail on my remote Fedora server. With what error message? Have you tried logging in with SSH or similar and trying the same command? Mo

[PHP] chown function

2005-10-03 Thread Keith Spiller
Hello, I'm using: chown("$endpath", "admin"); to try to change the owner of directories after using mkdir() to create them. It continues to fail on my remote Fedora server. I know the path is correct because mkdir() works perfectly. Apache sets the owner as 48 when the directory is created. I

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
This is the part of the code as it stands, it gives a permission denied error. $imtemp=$_FILES['file']['tmp_name']; $imsize=$_FILES['file']['size']; $imname=$_FILES['file']['name']; if ($imsize > "10") {zerror("Image too large","Please go back and correct, image must be less than 100k"

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
Not sure about cron, but will look into sudo. Thanks! "Adrian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > you could setup a cronjob running as root which chowns the files. > or maybe you can so something with sudo > > > > > > -- > Adrian > mailto:[EMAIL

[PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
Hiya, I have written as part of my CMS, an image upload system, now when the images are placed in the destination folder, they are owned by httpd.root and I need to get them to be owned by siteuser.sitegroup. I have tried to chmod and chgrp it to siteuser.sitegroup but it gives permission denied

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
This is the part of the code as it stands, it gives a permission denied error. $imtemp=$_FILES['file']['tmp_name']; $imsize=$_FILES['file']['size']; $imname=$_FILES['file']['name']; if ($imsize > "10") {zerror("Image too large","Please go back and correct, image must be less than 100k"

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Jason Wong
On Wednesday 06 August 2003 18:16, Bix wrote: > I have written as part of my CMS, an image upload system, now when the > images are placed in the destination folder, they are owned by httpd.root > and I need to get them to be owned by siteuser.sitegroup. > > I have tried to chmod and chgrp it to s

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-11 Thread Bix
Much appreciated! Will try the ftp approach, thanks. "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wednesday 06 August 2003 18:16, Bix wrote: > > > I have written as part of my CMS, an image upload system, now when the > > images are placed in the destination folder

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-10 Thread Adrian
you could setup a cronjob running as root which chowns the files. or maybe you can so something with sudo -- Adrian mailto:[EMAIL PROTECTED] www: http://www.planetcoding.net www: http://www.webskyline.de -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-07 Thread Mike Migurski
>I have written as part of my CMS, an image upload system, now when the >images are placed in the destination folder, they are owned by httpd.root >and I need to get them to be owned by siteuser.sitegroup. > >I have tried to chmod and chgrp it to siteuser.sitegroup but it gives >permission denied e

Re: [PHP] chown() despiration

2003-01-23 Thread Jason Wong
On Thursday 23 January 2003 21:49, Urb LeJeune wrote: > I could do this in perl but I'm being stubborn :-) > > When I run the following code as a regular user, everything fails. > When I run it as root the directory is created and the chmod > works. However, chown reports: [snip] > To help

[PHP] chown() despiration

2003-01-23 Thread Urb LeJeune
I could do this in perl but I'm being stubborn :-) When I run the following code as a regular user, everything fails. When I run it as root the directory is created and the chmod works. However, chown reports: chown failed: Operation not permitted Here is the code. $Directory2Create = "/hom

Re: [PHP] chown()

2003-01-22 Thread Urb LeJeune
what does posix_getlogin() return? perhaps you aren't really running the script as root... posix_getlogin() return a empty string. However, the script is definitely running as root. The same script is creating directories in another user's account using mkdir() If the script U

Re: [PHP] chown()

2003-01-22 Thread Evan Nemerson
what does posix_getlogin() return? perhaps you aren't really running the script as root... On Wednesday 22 January 2003 08:05 pm, Urb LeJeune wrote: > Has anyone had success in changing the ownership of a directory > for within a PHP script? I am running as root an have tries > exec() > passthru

[PHP] chown()

2003-01-22 Thread Urb LeJeune
Has anyone had success in changing the ownership of a directory for within a PHP script? I am running as root an have tries exec() passthru() ``back ticks system() This works fine in a Perl script: `chown egovdemo:nobody /home/e-govdemo/htdocs`; They are back ticks. Same line in the PHP scr

Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread Erik Price
On Monday, April 15, 2002, at 02:22 PM, Darren Gamble wrote: > Setting up sudo access should work properly. Ensure that the service is > actually running as "nobody" and not another unprivileged user. > > However, it should be mentioned that this is a very, very insecure > method! > The chown

Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread Erik Price
On Monday, April 15, 2002, at 02:05 PM, John Weez wrote: > No, user nobody does not have access to chown command. This is part of > my problem i suspect. So then your "chown" command's permissions do not allow "everyone" to execute it? If this is not the standard setup, so I would speak to

Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread Eugene Lee
On Mon, Apr 15, 2002 at 10:54:51AM -0700, John Weez wrote: : : I have a script which makes a directory. This directory is owned by : nobody.nobody because that is what apache runs as. But, I want this : directory to be owned by a differrent user. So, After making the : directory i use the php

RE: [PHP] chown ..opperation not permitted

2002-04-15 Thread Darren Gamble
ROTECTED]] Sent: Monday, April 15, 2002 11:55 AM To: [EMAIL PROTECTED] Subject: [PHP] chown ..opperation not permitted Hi all, My config is Apache 1.3 with PhP4 loaded as a module. I have a script which makes a directory. This directory is owned by nobody.nobody because that is what apache runs

Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread John Weez
No, user nobody does not have access to chown command. This is part of my problem i suspect. Erik Price wrote: > > >> > > Are you saying that when you are logged in as "nobody", you can > execute "chown otheruser directoryname"? If that is so then PHP, > which runs under Apache which runs

Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread Erik Price
On Monday, April 15, 2002, at 01:54 PM, John Weez wrote: > I have a script which makes a directory. This directory is owned by > nobody.nobody because that is what apache runs as. But, I want this > directory to be owned by a differrent user. So, After making the > directory i use the php co

[PHP] chown ..opperation not permitted

2002-04-15 Thread John Weez
Hi all, My config is Apache 1.3 with PhP4 loaded as a module. I have a script which makes a directory. This directory is owned by nobody.nobody because that is what apache runs as. But, I want this directory to be owned by a differrent user. So, After making the directory i use the php comm

Re: [PHP] chown error?

2002-04-10 Thread John Weez
Ah yes my brain was tired..I meant chown. I want to change the ownership of the newly created file to an existing user. The form has a field where they input their login name and the nam,e of the newly created directory. The PhP script is passed teh varibles but fails to change ownership to

Re: [PHP] chown/chgrp not working

2001-11-30 Thread Fred
<[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 > >

Re: [PHP] chown/chgrp not working

2001-11-30 Thread Paul Warner
TED]>; <[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). > > Fo

RE: [PHP] chown/chgrp not working

2001-11-30 Thread Darren Gamble
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

[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