Hi,
 I am trying to sort the 2000 or so .qmail-* files that I have in
/var/qmail/alias. I have created three subdirectories with the same
alias:qmail ownership:

/var/qmail/alias/system
        - will contain system aliases such as postmaster, root, toor, manager,
etc

/var/qmail/alias/ezmlm
        - will contain ezmlm aliases

/var/qmail/alias/normal
        - will contain everything else

 I want to use the users/assign file to assign the new locations to
these .qmail-* files. The benefits of organizing my aliases into
different directories are quite large to me, since I want to write some
web apps for users to list and possibly manipulate aliases. Only certain
users could change system aliases, and certain other users could change
normal aliases. You get the point...

 My first test of just the system aliases got me into really big trouble
on my test system. It took me about an hour to repair the damage caused.
Read below to see what I did, and if you can tell me where I am going
wrong.

        - copied the system aliases into their new location and made sure the
permissions were correct.
        - wrote a users/assign file and ran qmail-newu.

uid=7790(alias)
gid=2107(qmail)

/var/qmail/users/assign
-----------------------
=bin:alias:7790:2107:/var/qmail/alias/system:::
=daemon:alias:7790:2107:/var/qmail/alias/system:::
=decode:alias:7790:2107:/var/qmail/alias/system:::
=dumper:alias:7790:2107:/var/qmail/alias/system:::
=games:alias:7790:2107:/var/qmail/alias/system:::
=ingres:alias:7790:2107:/var/qmail/alias/system:::
=mailer-daemon:alias:7790:2107:/var/qmail/alias/system:::
=manager:alias:7790:2107:/var/qmail/alias/system:::
=news:alias:7790:2107:/var/qmail/alias/system:::
=nobody:alias:7790:2107:/var/qmail/alias/system:::
=operator:alias:7790:2107:/var/qmail/alias/system:::
=postmaster:alias:7790:2107:/var/qmail/alias/system:::
=root:alias:7790:2107:/var/qmail/alias/system:::
=system:alias:7790:2107:/var/qmail/alias/system:::
=toor:alias:7790:2107:/var/qmail/alias/system:::
=uucp:alias:7790:2107:/var/qmail/alias/system:::
=uucp-default:alias:7790:2110:/var/qmail/alias/system:::
.

 The result of this action what that file ownerships of my entire qmail
install got changed to have an owner of alias, group of root. All of
qmail/queue and qmail/bin were completely hosed. Qmail wouldn't even
accept messages because it couldn't write to the queue. This took me
about an hour of comparing between another functioning system to get all
the file permissions and owners/groups correct again. 

 How is qmail/bin/qmail-newu command changing the
group/owner/permissions of my entire qmail installation? This is pretty
unforgiving if a person new to this technique makes some mistake in the
assign file, like I obviously have. I just couldn't believe that it
could even do this. 

 If somebody knows where I messed up, please reply to me and the list.

Thanks,
Mike

Reply via email to