Re: Chown as regular user?

From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 05/26/05


Date: Thu, 26 May 2005 12:45:45 +0200

In comp.os.linux.security SimonV <Simon.vanherweghe@gmail.com>:
> Hi,
> I'm working on a web-based hosting administration in php. (Debian
> Linux)
> For the creation of new web directories and other server manipulations,
> I use perl scripts that I've set-uid to a user who has the rights in
> those directories.
> Everything works fine so far, but now, the mail and ftp directory
> should have their own user and group i.o. the user who created them.
> But I've just read in a book that only a root user can do a chown...
> I've tested it, and indeed, it isn't possible to do it, except when I'm
> root.

> And it isn't that safe to set-uid my scripts as root user.

Sure it is, the kernel will happily ignore the SUID bit on
scripts.;)

> Is there a work-around for this?

A carefully designed script running through sudo might be
possible, but still dangerous. What about setting GID on the
directory?

-- 
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 309: firewall needs cooling


Relevant Pages

  • Re: Chown as regular user?
    ... >> For the creation of new web directories and other server manipulations, ... >> But I've just read in a book that only a root user can do a chown... ...
    (comp.os.linux.security)
  • Re: Some of the users are not getting smtp addresses defined in RU
    ... need not to go in scripts used for creation of user id. ... ADS & Exchange Admin ... We are used to create users in bulk using scripts. ...
    (microsoft.public.exchange.admin)
  • Boot time script under user ID
    ... I am trying to start a set of processes on behalf of a non root user at ... boot time. ... I want the scripts to have the PATH, ... *nixes such as Solaris 10. ...
    (comp.os.linux.setup)
  • Re: Where to put scripts
    ... we are creating lot's of little scripts on our servers, some in bash, some ... Any best or common practice? ... 'sbin' directories are for system tools, those which are typically only used ... by the root user ...
    (Debian-User)
  • Re: [SLE] .alias entry for more commands
    ... On Mon, 2005-06-06 at 18:44 +0200, pelibali wrote: ... > I have more scripts I would like to run as the root user. ... "The day Microsoft makes something that doesn't suck is probably ...
    (SuSE)