Date: Thu, 22 Feb 2024 07:09:44 +0000 From: bugzilla-noreply@freebsd.org To: jail@FreeBSD.org Subject: [Bug 277210] jail(8): exec.clean retrieves PWD from user info (can cause services to crash on jail start-up) Message-ID: <bug-277210-29815-utnL9TxSvg@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-277210-29815@https.bugs.freebsd.org/bugzilla/> References: <bug-277210-29815@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=3D277210 --- Comment #6 from johannes.kunde@gmail.com --- (In reply to Jamie Gritton from comment #5) > While it does make sense to root from the jail's root under exec.clean, i= t unfortunately clashes with a decade of current practice. I get the idea. I believe it runs contrary to what most people expect to be= the outcome, which would be a behavior consistent with the host system. A servi= ce running inside a jail with a user other than root most likely doesn't want = to start at /root. > It seems reasonable that if a user is specified (even directly like -U ro= ot), then it would still chdir to its home, but in the absence of a user, s= tarting in "/" would in fact be the most expected outcome. That sounds reasonable. I think one of the main problems is also the lack of information when the problem occurs unexpectedly in the wild. All I got printed out from an exte= rnal library, which caused the issue in my case, was this line: > Feb 12 20:20:39 myjail myservice[9364]: 2024/02/12 20:20:39 stat .: permi= ssion denied Starting from there, it's almost impossible to have a clue what's going on. I don't know if there is any good chance to generate helpful output at runt= ime, but some hints in the manpage would help as well. --=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-277210-29815-utnL9TxSvg>