[SLUG] Problems with setuid bits on file permissions

From: Electric Monk (elctmonk@yahoo.com)
Date: Mon Jul 23 2001 - 10:57:17 EDT


I'm having problems either understanding or using the
setuid bits in a file's permission mask.

As I understand it, when the set-user-id part of the
permissions mask (4000) is set, the executable file
(in this case, the samba daemon) runs as the uid that
owns the file.

What I'm trying to do is get samba to run as the
system user "samba" that I set up on my machine, in
order to prevent it from running as root while still
having access to all the necessary files. I've set
the file modes for smbd and nmbd as "4555" and set the
owner of both files as "samba". However, the programs
only seem to start when I execute them as the root
user (I tried running them as a regular user, and
although it didn't produce any error messages, it
didn't show up in the process list either), and on
running "ps aucx", I find out that they are running as
root, despite the fact that I set the setuid part of
the file mask.

What am I doing wrong?

--Kevin Fogleman

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:36:29 EDT