Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74145 - webapp-config and file permissions
Summary: webapp-config and file permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor
Assignee: Stuart Herbert (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-11 17:06 UTC by Julien Allanos (RETIRED)
Modified: 2005-11-20 09:38 UTC (History)
1 user (show)

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 Julien Allanos (RETIRED) gentoo-dev 2004-12-11 17:06:07 UTC
after installing phpldapadmin-0.9.4b with webapp-config-1.10-r11, i've noticed that:

export.php
export_form.php
export_functions.php
templates/creation/new_address_template.php
templates/creation/new_dns_entry.php

were 755 chmoded, instead of 644 as any other regular php pages.

With phpicalendar (http://bugs.gentoo.org/show_bug.cgi?id=72390), i have:

languages/esperanto.inc.php
calendars/US Holidays.ics
templates/default/images/shadow_l.gif
templates/default/images/shadow_m.gif
templates/default/images/shadow_r.gif

chmoded 755.

Can you experiment and tell me if you can reproduce this? Thanks!
Comment 1 Stuart Herbert (RETIRED) gentoo-dev 2005-06-07 15:23:03 UTC
Hi,

Can you retest with webapp-config v1.11 plz?

Thanks,
Stu
Comment 2 Julien Allanos (RETIRED) gentoo-dev 2005-06-21 15:45:02 UTC
Stu,

it appears that:

1/ webapp-config-1.11 didn't solve the problem (only tested with
phpldapadmin-0.9.6c, not phpicalendar). Actually these files are 755 inside the
package archive. However I doubt the .php files are designed to be called by
anything else than the web server, so it might be a packaging bug upstream.
Should web-app config take care of such things? There is also a shell script
(755 chmoded) in the doc/ directory, but I believe the doc/ directory isn't part
of htdocs and should be installed in /usr/share/doc/. But this is another story,
and might be subject to another bug.

2/ the config.php file, which was 640 root:apache before the installation,
became 640 root:root. I think a VHOST_CONFIGOWNED_UID/GID setting would be
necessary to handle that. Furthermore, and that is a bit more weird, the config
file has been overwritten during the installation of phpldapadmin -though
webapp-config says it's a config-owned file in verbose mode-, without saving the
old version to a ._cfg file!! Major bug here?
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2005-06-23 16:15:36 UTC
Hrm.  webapp-config is probably taking the file permissions from the original 
package.  Check the permissions under /usr/share/webapps/$PN/$PVR/ to see if 
the files there are also 755.  If so, we can fix in the ebuild, or report 
UPSTREAM.

There already are VHOST_CONFIG_UID and VHOST_CONFIG_GID settings; you can set 
them in /etc/vhosts/webapp-config, and via command-line parameters.  The 
default value for VHOST_CONFIG_UID is 'root', and the default value for 
VHOST_CONFIG_GID is root's primary group (normally root).

I'll have to do some local testing, and see if I can reproduce the problem of 
the config file being overwritten.  v1.11 does include a new cache 
optimisation; it's possible that it's trying too hard to get things done 
quickly :(
Comment 4 Triffid Hunter 2005-09-29 13:47:29 UTC
not sure if this is related, but every time I install something with webapp-
config, it changes the ownership of my /var/www/<vhost> directory without 
changing the permissions.

my /var/www/vhost is root:apache,0750 and webapp-config changes the group to 
root...

It's extremely annoying, and has the effect that my entire site goes down any 
time I run webapp-config until such time as I notice/remember and chgrp -R my /
var/www/vhosts back the way they were.

please note: it changes /var/www/vhost, NOT just /var/www/vhost/htdocs/
newly_installed_webapp (which would be fine since the webapp wouldn't work until 
configured)

should this be in a separate bug?
Comment 5 Stuart Herbert (RETIRED) gentoo-dev 2005-11-20 09:38:23 UTC
Fixed in webapp-config v1.50.  Any further problems, please re-open this bug or
file a new one.

Best regards,
Stu