Preventing file from deletion

Preventing file from deletion

Post by Frank de Bo » Thu, 26 Jun 2003 10:19:01



Hi,

I have to following case. I need to put a file in an user's
homedirectory with the ownership of the user, but I want to prevent that
this file is deleted (Don't ask why ;-)) is this somehow possible and how?

Thanks in advanced,

Frank de Bot

 
 
 

Preventing file from deletion

Post by Warren Bloc » Thu, 26 Jun 2003 11:05:25



Quote:> I have to following case. I need to put a file in an user's
> homedirectory with the ownership of the user, but I want to prevent that
> this file is deleted (Don't ask why ;-)) is this somehow possible and how?

See the man page for chflags.  The "sunlnk" flag may do what you want.

--
Warren Block * Rapid City, South Dakota * USA

 
 
 

Preventing file from deletion

Post by Sean Hamilto » Thu, 26 Jun 2003 11:58:49


| I have to following case. I need to put a file in an user's
| homedirectory with the ownership of the user, but I want to
| prevent that this file is deleted (Don't ask why ;-)) is this
| somehow possible and how?

You could place the file inside a root-owned directory within that user's
home directory. For example:

-rw-r--r--  bob   bob    /home/bob
drwxr-xr-x  root  wheel  /home/bob/nodelete
-rw-r--r--  bob   bob    /home/bob/nodelete/some-file

sh

 
 
 

1. Prevent File Access with Files or FilesMatch Directive

Running Apache 1.3.22 on SunOS 5.8

We are converting from a Netscape web server to Apache.  I compiled and installed and everything seems to be working fine EXCEPT I cannot set basic authetication for individual files.  Basic authentication for directories works fine.  Is there a specific module that needs to be included at compile time?  I figured whatever the server uses for basic authentication on directories would be the same for files.

These lines in my httpd.conf file work fine:

<Directory /export/home/www/docs/FEA>
        AuthType Basic
        AuthName "FEA User Information"
        AuthUserFile /export/home/apache/passwd/feauser
        Require user feauser
</Directory>

These lines, which come later in the file, do not:

<Files People.html>
        AuthType Basic
        AuthName "Staff"
        AuthUserFile /export/home/apache/passwd/tim
        Require user tim
</Files>

I have also tried

<Files /export/home/www/docs/ECTD/Staff/People.html>
        AuthType Basic
        AuthName "Staff"
        AuthUserFile /export/home/apache/passwd/tim
        Require user tim
</Files>

as well as

<Directory /export/home/www/docs/ECTD/Staff>
        <Files People.html>
                AuthType Basic
                AuthName "Staff"
                AuthUserFile /export/home/apache/passwd/tim
                Require user tim
        </Files>
</Directory>

as well as many other permutations using the FilesMatch directive, double quotes, wildcards, etc.  I have also tried placing these lines in a .htaccess file, all to no avail.

What am I missing here? ... I am assuming it is something rudimentary.  I have read many FAQ's, etc, but can't seem to glean what I am doing wrong.

Any help would be greatly appreciated.
--

Brian Murphy
Mechanical Engineer, Unix Sys. Admin.
Siemens Westinghouse Power Corporation

PHONE: 407.736.5215
FAX  : 407.736.5069

2. Java can't load library libXpm.so.4

3. file deletion

4. Apache on Solaris 2.5 and Netscape Navigator

5. Weird file deletion problem

6. X pictures on strange terminal.

7. Crafty automatic file deletion?

8. Automatically fetch updated files per ftp?

9. ext3 file deletion

10. file deletion protection

11. Mysterious File deletion!

12. File protection against deletion

13. Intelligent, semi-automatic file deletion?