From: Ryan Underwood Subject: Re: root can't access files? Date: Fri, 29 Aug 2003 14:01:24 -0500 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <20030829190124.GB32327@dbz.icequake.net> References: <20030829043916.GQ21868@dbz.icequake.net> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-msdos@vger.kernel.org Hi Bart, On Fri, Aug 29, 2003 at 10:37:27AM +0100, Bart Oldeman wrote: > On Thu, 28 Aug 2003, Ryan Underwood wrote: > > > Now, the other scenario is this: we are root, and startup the bbs as > > root. The BBS this time is configured to setuid to another user for the > > security reasons, so it setuids to 'bbs'. dosemu is started as 'bbs', > > but apparently checks the real uid to find where to access ~/.dosemu, > > tries to write to files in /root/.dosemu which 'bbs' has no permissions > > for, and quits immediately when it fails. > > No, as far as I can't see simply uses $HOME/.dosemu. I can't see any > extraction of the home directory name from /etc/passwd. > > The easiest way to workaround would be to start using HOME=/home/bbs Of course, I was up late and the obvious solution completely escaped me. For some reason I was thinking the DOSEMU was getting the home directory from the pwent instead of the environment $HOME. Silly! :) -- Ryan Underwood, , icq=10317253