Re: [OT] change user when executing some script



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@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Groups, Permissions and /Share
    ... you can change the permissions with chmod. ... Any respondents should be aware that I am, obviously, very new to Debian. ... wireless network. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Classic Gnubie accident
    ... When I log in I get the message - your home directory .dmrc file has the wrong permissions - permissions should be set to 664 ... I am reading the debian manual on file permissions, but I don't see an obvious way to reset this especially since I only have access to this file as root. ... Not sure if booting in single-user mode will give you root permission. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Classic Gnubie accident
    ... debian for over a year 've managed to lock myself out of my /home ... file has the wrong permissions - permissions should be set to 664 ... If booting in single-user mode doesn't work, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Desktop user: Etch or the next testing?
    ... you have the option to use Debian by it's ... Why is Windows used by so many people? ... Microsoft became dominant in the software-for-desktop-computers before ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • RE: Which IM, blog and email service are best for debian users?
    ... blog and email service are best for debian users? ... microsoft live messenger, live spaces and hotmail as my IM, blog and email ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)