[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] change user when executing some script



Thank you guys. Unfortunately, I cannot do that since I am not root
and can neither add group nor modify any /etc/*. That is the reason
why I was looking for a solution to change the user when executing the
script. setuid and setgid are nice to apply the script owner
permissions to the users, but the file creation is done on behalf of
users and not of script owner. So file deletion..... cannot run.

Gal'



2007/6/14, Bob Proulx <bob@proulx.com>:
Douglas Allan Tutty wrote:
> Galevsky wrote:
> > How can I make the /home/user1/testfile belong to user1, the owner of
> > the script instead of the user that launches it ?
>
> On DEBIAN, to remove a file, you need write permissions on the directory
> in which it resides.  I suppose user1 could give group write to the
> directory.  You would then create a group and put user[1-3] in that
> group.

Yes.  That would be good.

Do this in a subdirectory of your home.  If your $HOME is writable by
others, group write, then many programs will refuse to trust files
there.  (e.g. sendmail/postfix/exim, procmail, ssh, etc.)

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org





Reply to: