Linux MS DOS discussions
 help / color / mirror / Atom feed
From: Ryan Underwood <nemesis-lists@icequake.net>
To: linux-msdos@vger.kernel.org
Subject: Re: root can't access files?
Date: Sun, 3 Aug 2003 21:00:44 -0500	[thread overview]
Message-ID: <20030804020043.GG3006@dbz.icequake.net> (raw)
In-Reply-To: <20030803030127.GF3006@dbz.icequake.net>


Okay, I figured out what is going on.

I have a daemon (BBS server) that is spawned from an init script, and
when a user accesses a DOS program in the BBS, it forks off DOSEMU to
redirect the comport I/O to the user.

The problem occurs when:
1) The daemon is run with root privileges
2) The daemon's init script is run through a `sudo`.

The latter is common since the sysop might use sudo to either restart
the BBS, or to apt-get upgrade (which will restart the daemon as part of
its process).  DOSEMU checks to the "real" uid, drops privileges to the
real uid, and then can no longer access the files which have root
permissions.  So it fails starting the user's requested program for
seemingly no reason.  However, when done a `su - root` and then running
the init script, there is no problem, since the real login is root that
time.

I explored various stupid hacks in the privilege code, but I just
thought I would ask if anyone has a better idea how to use sudo with
dosemu.  This is a little bit of a pain!

Ryan

On Sat, Aug 02, 2003 at 10:01:27PM -0500, Ryan Underwood wrote:
> 
> I found that the behavior is different when using sudo than when root
> has a login shell (or su).  The sudo won't allow access.  Strange!
> 
> 
> On Sat, Aug 02, 2003 at 09:50:37PM -0500, Ryan Underwood wrote:
> > 
> > Hi,
> > 
> > I have some file that is mode 600, owned by user.user.  If root tries to
> > access that file from within dosemu, he gets "access denied".  How can
> > it be specified, that root running dosemu means he gets to do anything
> > within DOS?
> > 
> > -- 
> > Ryan Underwood, <nemesis at icequake.net>, icq=10317253
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> -- 
> Ryan Underwood, <nemesis at icequake.net>, icq=10317253
> -
> To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Ryan Underwood, <nemesis at icequake.net>, icq=10317253

  reply	other threads:[~2003-08-04  2:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-03  2:50 root can't access files? Ryan Underwood
2003-08-03  3:01 ` Ryan Underwood
2003-08-04  2:00   ` Ryan Underwood [this message]
     [not found]     ` <20030804164736.28318.qmail@web14301.mail.yahoo.com>
2003-08-04 19:11       ` Ryan Underwood
2003-08-04 22:40     ` Bart Oldeman
2003-08-29  4:39       ` Ryan Underwood
2003-08-29  9:37         ` Bart Oldeman
2003-08-29 19:01           ` Ryan Underwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030804020043.GG3006@dbz.icequake.net \
    --to=nemesis-lists@icequake.net \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox