How to configure which user fcgiwrap runs as on FreeBSD?
I have Redmine/Git/nginx/fcgiwrap running in a jail on FreeBSD 9.3 for (potentially) authenticated Git commits over HTTP/S. Everything works until I restart the jail.
In order for a commit to work I need to manually change /var/run/fcgiwrap/fcgiwrap.sock
from srwxr-xr-x root:wheel
to srwxrwxr-x root:www
.
It seems like there should be a better way to do this so that its persistent over a reboot. My feeling is that there should be some way of telling fcgiwrap who to run as but I can't work out where this is specified on FreeBSD.
The man page says:
Most probably you will want to launch fcgiwrap by spawn-fcgi using a configuration like this:
FCGI_SOCKET=/var/run/fcgiwrap.sock
FCGI_PROGRAM=/usr/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=www
FCGI_EXTRA_OPTIONS="-M 0700"
ALLOWED_ENV="PATH"
Based on this question I have looked in /usr/local/etc/rc.d
for spawn-fcgi
but its not there which I assume means its not installed. It also seems overkill to install spawn-fcgi just to manage who fcgiwrap runs as.
I've found in /usr/local/etc/rc.d/fcgiwrap
it says:
# fcgiwrap rc.d script supports multiple profiles (a-la rc.d/nginx)
# When profiles are specified, the non-profile specific parameters become defaults.
# You need to make sure that no two profiles have the same socket parameter.
What is a profile and how would I go about creating one for this rc.d script? Or am I going about this all the wrong way?
freebsd configuration nginx fastcgi
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have Redmine/Git/nginx/fcgiwrap running in a jail on FreeBSD 9.3 for (potentially) authenticated Git commits over HTTP/S. Everything works until I restart the jail.
In order for a commit to work I need to manually change /var/run/fcgiwrap/fcgiwrap.sock
from srwxr-xr-x root:wheel
to srwxrwxr-x root:www
.
It seems like there should be a better way to do this so that its persistent over a reboot. My feeling is that there should be some way of telling fcgiwrap who to run as but I can't work out where this is specified on FreeBSD.
The man page says:
Most probably you will want to launch fcgiwrap by spawn-fcgi using a configuration like this:
FCGI_SOCKET=/var/run/fcgiwrap.sock
FCGI_PROGRAM=/usr/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=www
FCGI_EXTRA_OPTIONS="-M 0700"
ALLOWED_ENV="PATH"
Based on this question I have looked in /usr/local/etc/rc.d
for spawn-fcgi
but its not there which I assume means its not installed. It also seems overkill to install spawn-fcgi just to manage who fcgiwrap runs as.
I've found in /usr/local/etc/rc.d/fcgiwrap
it says:
# fcgiwrap rc.d script supports multiple profiles (a-la rc.d/nginx)
# When profiles are specified, the non-profile specific parameters become defaults.
# You need to make sure that no two profiles have the same socket parameter.
What is a profile and how would I go about creating one for this rc.d script? Or am I going about this all the wrong way?
freebsd configuration nginx fastcgi
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have Redmine/Git/nginx/fcgiwrap running in a jail on FreeBSD 9.3 for (potentially) authenticated Git commits over HTTP/S. Everything works until I restart the jail.
In order for a commit to work I need to manually change /var/run/fcgiwrap/fcgiwrap.sock
from srwxr-xr-x root:wheel
to srwxrwxr-x root:www
.
It seems like there should be a better way to do this so that its persistent over a reboot. My feeling is that there should be some way of telling fcgiwrap who to run as but I can't work out where this is specified on FreeBSD.
The man page says:
Most probably you will want to launch fcgiwrap by spawn-fcgi using a configuration like this:
FCGI_SOCKET=/var/run/fcgiwrap.sock
FCGI_PROGRAM=/usr/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=www
FCGI_EXTRA_OPTIONS="-M 0700"
ALLOWED_ENV="PATH"
Based on this question I have looked in /usr/local/etc/rc.d
for spawn-fcgi
but its not there which I assume means its not installed. It also seems overkill to install spawn-fcgi just to manage who fcgiwrap runs as.
I've found in /usr/local/etc/rc.d/fcgiwrap
it says:
# fcgiwrap rc.d script supports multiple profiles (a-la rc.d/nginx)
# When profiles are specified, the non-profile specific parameters become defaults.
# You need to make sure that no two profiles have the same socket parameter.
What is a profile and how would I go about creating one for this rc.d script? Or am I going about this all the wrong way?
freebsd configuration nginx fastcgi
I have Redmine/Git/nginx/fcgiwrap running in a jail on FreeBSD 9.3 for (potentially) authenticated Git commits over HTTP/S. Everything works until I restart the jail.
In order for a commit to work I need to manually change /var/run/fcgiwrap/fcgiwrap.sock
from srwxr-xr-x root:wheel
to srwxrwxr-x root:www
.
It seems like there should be a better way to do this so that its persistent over a reboot. My feeling is that there should be some way of telling fcgiwrap who to run as but I can't work out where this is specified on FreeBSD.
The man page says:
Most probably you will want to launch fcgiwrap by spawn-fcgi using a configuration like this:
FCGI_SOCKET=/var/run/fcgiwrap.sock
FCGI_PROGRAM=/usr/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=www
FCGI_EXTRA_OPTIONS="-M 0700"
ALLOWED_ENV="PATH"
Based on this question I have looked in /usr/local/etc/rc.d
for spawn-fcgi
but its not there which I assume means its not installed. It also seems overkill to install spawn-fcgi just to manage who fcgiwrap runs as.
I've found in /usr/local/etc/rc.d/fcgiwrap
it says:
# fcgiwrap rc.d script supports multiple profiles (a-la rc.d/nginx)
# When profiles are specified, the non-profile specific parameters become defaults.
# You need to make sure that no two profiles have the same socket parameter.
What is a profile and how would I go about creating one for this rc.d script? Or am I going about this all the wrong way?
freebsd configuration nginx fastcgi
freebsd configuration nginx fastcgi
edited Apr 13 '17 at 12:13
Community♦
1
1
asked Sep 5 '15 at 12:09
Styne666Styne666
1788
1788
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
OK. Never mind. I was closer to the solution than I thought. Reading through Practical rc.d scripting in BSD I just needed to add fcgiwrap_user="www"
to /etc/rc.conf
.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f227705%2fhow-to-configure-which-user-fcgiwrap-runs-as-on-freebsd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
OK. Never mind. I was closer to the solution than I thought. Reading through Practical rc.d scripting in BSD I just needed to add fcgiwrap_user="www"
to /etc/rc.conf
.
add a comment |
OK. Never mind. I was closer to the solution than I thought. Reading through Practical rc.d scripting in BSD I just needed to add fcgiwrap_user="www"
to /etc/rc.conf
.
add a comment |
OK. Never mind. I was closer to the solution than I thought. Reading through Practical rc.d scripting in BSD I just needed to add fcgiwrap_user="www"
to /etc/rc.conf
.
OK. Never mind. I was closer to the solution than I thought. Reading through Practical rc.d scripting in BSD I just needed to add fcgiwrap_user="www"
to /etc/rc.conf
.
answered Sep 5 '15 at 14:49
Styne666Styne666
1788
1788
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f227705%2fhow-to-configure-which-user-fcgiwrap-runs-as-on-freebsd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown