Page 1 of 1

Painted into a corner: apache.apache ownerships!

Posted: Sun Jan 21, 2007 8:53 am
by zoidberg
I have a newish 1.1 install that I run out of a ~/public_html dir on a shell host machine, ergo no root access. Here's what I'm looking at in the top-level Serendipity directory:

$ ls -l
total 324
drwxrwxr-x 2 apache apache 4096 Jan 8 00:23 archives
drwxr-xr-x 12 wingnut users 4096 Dec 28 16:08 bundled-libs
-rw-r--r-- 1 wingnut users 6814 Apr 6 2006 comment.php
drwxr-xr-x 5 wingnut users 4096 Dec 28 16:07 deployment
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 docs
-rw-r--r-- 1 wingnut users 1526 Apr 6 2006 exit.php
drwxr-xr-x 7 wingnut users 4096 Dec 28 16:07 htmlarea
drwxr-xr-x 5 wingnut users 4096 Dec 28 16:07 include
-rw-r--r-- 1 wingnut users 23170 Nov 28 09:48 index.php
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 lang
-rw-r--r-- 1 wingnut users 139686 Jan 21 00:52 ls-lR.txt
drwxrwxrwt 33 wingnut users 4096 Jan 9 00:54 plugins
-rw-r--r-- 1 wingnut users 10022 Nov 2 06:20 rss.php
-rw-r--r-- 1 wingnut users 2204 Jun 2 2006 serendipity.css.php
-rw-r--r-- 1 wingnut users 17072 Nov 15 05:21 serendipity_admin.php
-rw-r--r-- 1 wingnut users 12640 Sep 14 04:45 serendipity_admin_image_selector.php
-rw-r--r-- 1 wingnut users 13982 Dec 6 09:56 serendipity_config.inc.php
-rwx------ 1 apache apache 629 Jan 8 00:23 serendipity_config_local.inc.php
-rw-r--r-- 1 wingnut users 526 Apr 6 2006 serendipity_define.js.php
-rw-r--r-- 1 wingnut users 10658 Aug 27 13:24 serendipity_editor.js
-rw-r--r-- 1 wingnut users 448 Apr 6 2006 serendipity_xmlrpc.php
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 sql
drwxrwxrwt 30 wingnut users 4096 Jan 8 01:12 templates
drwxrwxrwt 2 wingnut users 4096 Jan 21 01:19 templates_c
drwxrwxrwt 2 wingnut users 4096 Dec 28 16:08 uploads
-rw-r--r-- 1 wingnut users 1469 Apr 6 2006 wfwcomment.php

Note the file with ownership apache.apache. Is that correct? Have I goofed somewhere in the install? I know I specified 'apache' as the user under which apache runs on this host.

More befuddling are these dirs under templates:

$ ls -l templates
total 116
drwxr-xr-x 3 apache apache 4096 Jan 8 01:04 1024px
-rw-r--r-- 1 wingnut users 66 Apr 16 2005 HOWTO
drwxr-xr-x 3 apache apache 4096 Jan 8 01:07 Modern_World_s9y_port
drwxr-xr-x 3 apache apache 4096 Jan 8 00:37 andreas09
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 blue
drwxr-xr-x 4 wingnut users 4096 Dec 28 16:07 carl_contest
drwxr-xr-x 4 wingnut users 4096 Dec 28 16:07 competition
drwxr-xr-x 4 wingnut users 4096 Dec 28 16:07 contest
drwxr-xr-x 5 wingnut users 4096 Dec 28 16:07 default
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 default-php
drwxr-xr-x 4 wingnut users 4096 Dec 28 16:07 default-rtl
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 default-xml
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 idea
drwxr-xr-x 4 wingnut users 4096 Jan 21 01:22 kubrick
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 moz-modern
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt-clean
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt-georgiablue
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 mt-gettysburg
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt-plainjane
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 mt-rusty
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt-stormy
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 mt-trendy
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 mt3-chalkboard
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt3-gettysburg
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt3-independence
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 mt3-squash
drwxr-xr-x 3 wingnut users 4096 Dec 28 16:07 newspaper
drwxr-xr-x 3 apache apache 4096 Jan 8 01:12 s9y_bluegrey
drwxr-xr-x 2 wingnut users 4096 Dec 28 16:07 wp

For those styles with owners apache.apache I cannot go in and edit the style.css files. Very disconcerting. Again, did I goof up the install?

I have access to my mysql tables via phpMyAdmin. Is there a value in there I can tweak to avoid a complete reinstall?

Thank you earthlings,

Re: Painted into a corner: apache.apache ownerships!

Posted: Mon Jan 22, 2007 2:28 pm
by garvinhicking
Hi!

By default, all files that Serendipity stores are stored as the user of your webserver. In your case that is "apache".

Usually if you have SSH access, you should put your SSH user in the same usergroup as the apache user also runs in to preserver access to those files.

If you have accidently cut yourself of, you could try to use the fixperm.php script mentioned in the FAQ on www.s9y.org.

The themes and plugins that are different come because you downloaded them via the Spartaucs plugin. This plugin though allows you to specify the ownership of downloaded files, soy ou could change them to preserve access to yourself!

HTH,
Garvin

Re: Painted into a corner: apache.apache ownerships!

Posted: Tue Jan 23, 2007 9:01 pm
by zoidberg
garvinhicking wrote:
If you have accidently cut yourself of, you could try to use the fixperm.php script mentioned in the FAQ on www.s9y.org.

The themes and plugins that are different come because you downloaded them via the Spartaucs plugin. This plugin though allows you to specify the ownership of downloaded files, soy ou could change them to preserve access to yourself!
Ah. Dawn breaks over Rhode Island! Thanks!