Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432908 - app-admin/webapp-config-1.50.19: Allow precise declaration of server uid/gid in the configuration file
Summary: app-admin/webapp-config-1.50.19: Allow precise declaration of server uid/gid ...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-26 23:09 UTC by Vincent Brillault
Modified: 2013-08-03 14:12 UTC (History)
3 users (show)

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


Attachments
Proposed patch to implement the enhancement (webapp-config-1.20.19-add-option-to-set-server-uid-gid-in-conf.patch,5.34 KB, text/plain)
2012-08-26 23:09 UTC, Vincent Brillault
Details
Proposed patch to implement the enhancement (with doc) (webapp-config-1.20.19-add-option-to-set-server-uid-gid-in-conf.patch,6.71 KB, patch)
2012-09-13 09:44 UTC, Vincent Brillault
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Brillault 2012-08-26 23:09:37 UTC
Created attachment 322328 [details]
Proposed patch to implement the enhancement

Webapp-config allows to declare some files as "server-owned", however the only option available to modify the uid/gid of such files is the "vhost_server" option which will be used to deduce some hard-coded values.

This patch adds two configuration options, "vhost_server_uid" and "vhost_server_gid", in order to modify those hard-coded values. If thoses options aren't present, the default values (for the considered vhost_server) will be used. If any of them is present, it will overide the corresponding hard-coded value.

One downside of this short patch is that it forbids the use of "root" as a valid option-specified "server-owned" uid/gid. If "root" is given as "vhost_server_uid" or "vhost_server_gid", it will be overided by the hard-coded value.

In order to use this enhancement, add any combination of "vhost_server_gid=${valid_gid_name}" and "vhost_server_uid=${valid_uid_name}" in the /etc/vhosts/webapp-config configuration file before trying to install an application. (You still need to specify a vhost_server).

For example, you can set the following options:
vhost_server="nginx"
vhost_server_gid="phpfpm"

It will result in nginx:phpfpm permission for "server-owned" installed files/folders.
Comment 1 Vincent Brillault 2012-09-13 09:44:32 UTC
Created attachment 323650 [details, diff]
Proposed patch to implement the enhancement (with doc)

New version of the patch, which also update the documentation
Comment 2 Anthony Basile gentoo-dev 2013-08-03 13:26:11 UTC
(In reply to Vincent Brillault from comment #1)
> Created attachment 323650 [details, diff] [details, diff]
> Proposed patch to implement the enhancement (with doc)
> 
> New version of the patch, which also update the documentation

committed

http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=a0eaa253b2950ecd1a88db3b3a3b298b03498e4c
Comment 3 Anthony Basile gentoo-dev 2013-08-03 14:12:44 UTC
(In reply to Anthony Basile from comment #2)
> (In reply to Vincent Brillault from comment #1)
> > Created attachment 323650 [details, diff] [details, diff] [details, diff]
> > Proposed patch to implement the enhancement (with doc)
> > 
> > New version of the patch, which also update the documentation
> 
> committed
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;
> h=a0eaa253b2950ecd1a88db3b3a3b298b03498e4c

please test webapp-config-1.51 which includes this commit