Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104117 - wordpress ebuild leaves files with wrong permissions
Summary: wordpress ebuild leaves files with wrong permissions
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-29 04:13 UTC by gentooroolz.b.sneaky_peeky
Modified: 2005-10-03 00:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gentooroolz.b.sneaky_peeky 2005-08-29 04:13:24 UTC
After emerging wordpress, /var/www/localhost/htdocs/wordpress and all files therein are owned 
root:root, with only owner write permission. This prevents archives and non-blog pages from working 
correctly, as WordPress is unable to create the directories needed.

Reproducible: Always
Steps to Reproduce:
1. emerge wordpress
2. Log in to WordPress
3. Make a new post (Write > Write Post)
4. Make a new non-blog page (Write > Write Page)
5. Click on 'View Site' at the top of the screen

Actual Results:  
The post shows on the front page. Clicking on the name of the page created in step 4 produces an error. 
Ditto clicking on a category. Examining the /var/www/localhost/htdocs/wordpress directory shows no 
archive/category directories have been created.

Expected Results:  
Clicking the links should have produced the appropriate content. The directories should have been created 
by WordPress, but were not due to permission problems.

Creating the directories as group apache with group write permission would fix this. The .php files 
themselves do not need group write, of course.

emerge info:
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r1, 2.6.11-gentoo-r3 
i686)
===============================================================
==
System uname: 2.6.11-gentoo-r3 i686 Pentium II (Deschutes)
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 26 2005, 01:24:51)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -march=pentium2 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/
share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -march=pentium2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/
gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dfx X aim alsa apache2 apm arts avi berkdb bitmap-fonts cdparanoia crypt cups curl eds 
emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 icq 
imagemagick imap imlib ipv6 jabber jpeg kde libg++ libwww mad mikmod mime motif mp3 mpeg msn 
mysql ncurses nls offensive ogg oggvorbis opengl oscar oss pam pcre pdflib perl php png python qt 
quicktime readline samba sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts usb vorbis xml2 
xmms xv yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Michael Hampton 2005-10-02 18:31:33 UTC
This bug does not look valid. WordPress is not Movable Type. WordPress stores
posts/pages in the database, not the filesystem.
Comment 2 Aaron Kulbe (RETIRED) gentoo-dev 2005-10-02 18:51:42 UTC
This is done with the .htaccess file.  Create an empty .htaccess file in your
DocumentRoot that is writeable by Apache, and go to your Permalinks menu in
WordPress and click on "Update Permalink Structure".
Comment 3 gentooroolz.b.sneaky_peeky 2005-10-03 00:51:47 UTC
Uh - if the WordPress tree is owned root:root, clicking 'Update Permalink Structure' doesn't work, because 
apache2 isn't running as root - therefore WordPress can't create the .htaccess or the relevant directory 
structure when I click on the button.

You certainly shouldn't have to manually create the .htaccess file - and if you try and change the 
permalink directory from the default to, say, 'previous_posts' then you shouldn't have to create that by 
hand as WordPress should be able to do it by itself, but it can't with the permissions that have been set by 
the ebuild.