[BlueOnyx:01091] Re: PHP method for changing folder / file owner?

Stephanie Sullivan ses at aviaweb.com
Fri Apr 17 08:22:37 -05 2009


Not quite - chmod g+S only the directories. chmod -R g+w * to give all group
write. chgrp -R sitexx * (where xx is your site number) to set the group
ownership. Some folders may need to be chmod o+w ... This is from memory
from last fall.

	Thanks,
		-Stephanie


> -----Original Message-----
> From: blueonyx-bounces at blueonyx.it [mailto:blueonyx-
> bounces at blueonyx.it] On Behalf Of Jeff Jones
> Sent: Friday, April 17, 2009 9:01 AM
> To: BlueOnyx General Mailing List
> Subject: [BlueOnyx:01090] Re: PHP method for changing folder / file
> owner?
> 
> Hey thanks for this Stephanie, (and Matt for the php chown ref)
> 
> So my situation is this:
> 
> drwxrwxr-- 	admin	site1	/Home/Sires/www.bb.com/Web/
> 
> In this setup - the wordpress site works, but can not write to
> anything because apache has read perms only
> 
> So what you are saying that if I set "safe_mode_gid = On" in php.ini
> 
> And then do a chmod g+S * in the /Home/Sires/www.bb.com/Web/
> directory - all the files in the directory below inherit the group
> ownership - in which case would be rwx?
> 
> Is that right?
> 
> Cheers,
> 
> Jeff
> 
> 
> 
> 
> On 17 Apr 2009, at 13:28, Stephanie Sullivan wrote:
> 
> > If the files are uploaded with ftp they need to be chmod'd for
> world
> > write
> > (or group write if using suggestions below). Not set by default.
> >
> > If php safe mode is on you should set "safe_mode_gid = On" in
> php.ini
> >
> > When wordpress is installed the directories do not have the group S
> > protection (chmod g+S *) enabled. This forces the default file
> > creation
> > group to be the same as the containing directory. It's on by
> default
> > on the
> > directories that BQ/BX creates. With this you should only need
> group
> > write
> > enabled. (chmod g+w ... and can be set by mod ftp clients). You
> will
> > still
> > need to (once) set the group to the site's group.
> >
> > Wordpress is really kind of a pain in the BX/BQ environment, but
> > works fine
> > once it's setup well.
> >
> > 	Thanks,
> > 		-Stephanie
> >
> > Stephanie Sullivan, President
> > AVIA web development and hosting
> > a division of AVIA Consulting, Inc.
> > GSEC Certified IT Security Consultant
> > Phone: 508-393-0750
> > Mobile: 508-954-2842
> > FAX: 508-975-0118
> >
> >
> >> -----Original Message-----
> >> From: blueonyx-bounces at blueonyx.it [mailto:blueonyx-
> >> bounces at blueonyx.it] On Behalf Of Jeff Jones
> >> Sent: Friday, April 17, 2009 5:30 AM
> >> To: Blueonyx at blueonyx.it
> >> Subject: [BlueOnyx:01086] PHP method for changing folder / file
> >> owner?
> >>
> >> Hi guys,
> >>
> >> I have a real hosting pain on my hands with BX with someone that
> is
> >> insisting on uploading files via wordpress via FTP using the admin
> >> user account, but not being able to write to them via wordpress.
> Due
> >> to the particular setup we run, we are not able to change folder
> >> ownership / perms via FTP.
> >>
> >> The only current solution is that I need to manually (each time)
> log
> >> in and change the ownership to apache, and that generally sorts
> it.
> >>
> >> I know there was talk of some sort of tickbox / permissions fixer
> -
> >> but in the meantime can anyone think of another way I can get
> around
> >> this?
> >>
> >> I have thought of perhaps they could upload a PHP file and put a
> >> CHOWN
> >> change request in that. The file would only be uploaded when they
> >> wanted to change perms, and I understand I would have to disable
> safe
> >> mode. But I'm rubbish as PHP so I was thinking perhaps someone
> knew
> >> how to do this?
> >>
> >> Are there any other suggestions?
> >>
> >> Cheers,
> >>
> >> Jeff
> >> _______________________________________________
> >> Blueonyx mailing list
> >> Blueonyx at blueonyx.it
> >> http://www.blueonyx.it/mailman/listinfo/blueonyx
> >
> > _______________________________________________
> > Blueonyx mailing list
> > Blueonyx at blueonyx.it
> > http://www.blueonyx.it/mailman/listinfo/blueonyx
> 
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at blueonyx.it
> http://www.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list