Re: prevent user to delete files in its own directory

From: Lew Pitcher (lpitcher_at_sympatico.ca)
Date: 08/09/05

  • Next message: Alan D Johnson: "Re: prevent user to delete files in its own directory"
    Date: Mon, 08 Aug 2005 22:49:03 -0400
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Alan D Johnson wrote:
    > galler wrote:
    >
    >> How can i prevent users to delete files that was created by root in
    >> their own directory?
    >> For example: I want to create the .rhosts file in all users home
    >> directory with permission to root only and prevent the users from
    >> delete or rename those files.
    >>
    >
    > chown(1), chmod(1)

    I'm not sure what you are recommending.

    If you are recommending that the OP chown(1) and chmod(1) the /file/, then
    that won't do any good. He wants to prevent the user from deleting the file
    from the /directory/, and changing the file ownership won't stop that.

    OTOH, if you are recommending that the OP chown(1) and chmod(1) the user's
    home /directory/, then, while those steps /will/ prevent the user from
    deleting the file, they will also prevent the user from creating or deleting
    /any/ file in his home directory.

    Are you /certain/ that chown(1) and chmod(1) are the way to go?

    - --
    Lew Pitcher

    Master Codewright & JOAT-in-training | GPG public key available on request
    Registered Linux User #112576 (http://counter.li.org/)
    Slackware - Because I know what I'm doing.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.7 (GNU/Linux)

    iD8DBQFC+BmfagVFX4UWr64RAtS6AKDcaFWRvYq2z4LJH2M9V9ksvmaEsgCg4A1y
    jEn5MFJjNUKW5o4exXOEPnw=
    =zdxN
    -----END PGP SIGNATURE-----


  • Next message: Alan D Johnson: "Re: prevent user to delete files in its own directory"