Re: How to disallow a user removing a directory but allow removing files within it?
From: Antoine EMERIT (reply_to_replay_at_daubededaube.nothing)
Date: 04/25/04
- Next message: bob seguin: "Tripwire?????"
- Previous message: David: "Re: Antivirus"
- In reply to: Kai Schaetzl: "How to disallow a user removing a directory but allow removing files within it?"
- Next in thread: Kai Schaetzl: "Re: How to disallow a user removing a directory but allow removing files within it?"
- Reply: Kai Schaetzl: "Re: How to disallow a user removing a directory but allow removing files within it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 25 Apr 2004 19:47:23 GMT
Kai Schaetzl <ng@conactive.com> wrote
news:VA.00003075.01f971ac@conactive.com:
> Problem is this:
> Many of our ftp users delete certain necessary directories in their
> home directories. To avoid the problems related to this I made those
> directories owned by root. All the files within that directory are
> still owned by the user and writable by him. The problem is he can't
> remove the files. The user can still write to the files, but he can't
> delete them. Is there a way to give the user delete "permission"?
> (They only need read and delete permission.)
There is no 'delete' permissions.
A file or a directory can be delete if you can modify (write access
enable) the directory that content it.
So to 'protect' a directory you should disable writing in its parent
directory.
In your case you have disable write access (because of the default group
permissions flag) to your concerned directory and so user can't remove
their file.
Set the parent directory of you concerned directory to the root owner or
remove its write permission flag.
But your user won't be able to create file or directory in this parent
directory.
There is other way to solve your problem (sticky bit, user/group/other
permission, ...), but you need to give us more information :
- chrooting user access in the home directory ?
- other way to access the home directory ?
- need to write in the parent directory ?
...
Regards
- Next message: bob seguin: "Tripwire?????"
- Previous message: David: "Re: Antivirus"
- In reply to: Kai Schaetzl: "How to disallow a user removing a directory but allow removing files within it?"
- Next in thread: Kai Schaetzl: "Re: How to disallow a user removing a directory but allow removing files within it?"
- Reply: Kai Schaetzl: "Re: How to disallow a user removing a directory but allow removing files within it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|