Date: Sun, 18 Apr 2021 15:23:42 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 255009] www/gitea: do not chown existing directories Message-ID: <bug-255009-7788-dkQwum9Rar@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-255009-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-255009-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255009 Adam Weinberger <adamw@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adamw@FreeBSD.org Assignee|ports-bugs@FreeBSD.org |adamw@FreeBSD.org --- Comment #2 from Adam Weinberger <adamw@FreeBSD.org> --- There's no clear rule on what to do there, so there's no wrong way to do it. I addressed this idea in a different way www/caddy in the rc(8) script: caddy_precmd() { # Create required directories and set permissions /usr/bin/install -d -m 755 -o "${caddy_user}" -g "${caddy_group}" ${caddy_directory} /usr/bin/install -d -m 700 -o "${caddy_user}" -g "${caddy_group}" ${caddy_directory}/config /usr/bin/install -d -m 700 -o "${caddy_user}" -g "${caddy_group}" ${caddy_directory}/data /usr/bin/install -d -m 755 -o "${caddy_user}" -g "${caddy_group}" ${caddy_logdir} /usr/bin/install -d -m 700 -o "${caddy_user}" -g "${caddy_group}" /var/run/caddy } The benefit there is that changes in the rc.conf are reflected the next tim= e it spins up. The drawback there is that it only changes the permissions on the directory itself; if you change from root:wheel (the default) to www:www, f= or example, the existing files can't be modified. Another approach could be to simply check whether those dirs are owned by gitea_user in the rc(8) script and spit out an error message with instructi= ons for what to chown -R. Another option is to just do nothing, and there is plenty of precedent for that. It's my least favorite option, but my guess is that the majority of p= orts don't bother with it. Stefan, it's your show. Do you have a feel for what approach you'd like to take? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255009-7788-dkQwum9Rar>