From: Glynn Clements <glynn@gclements.plus.com>
To: Dermot Paikkos <Dermot.Paikkos@sciencephoto.co.uk>
Cc: linux-admin@vger.kernel.org
Subject: RE: chattr immutable
Date: Mon, 16 Feb 2009 20:57:25 +0000 [thread overview]
Message-ID: <18841.54069.853764.539557@cerise.gclements.plus.com> (raw)
In-Reply-To: <L0F0D268C44294eadAB34AF22E737F160.1234801058.earth.sciencephoto.co.uk@MHS>
Dermot Paikkos wrote:
> One of the other things I was hoping to do was deny users from renaming
> the folder or the other classic mistake, accidently drag and drop a
> folder into another folder.
Create, move, rename and delete are determined by the permissions on
the containing directory. It isn't possible to set different
restrictions for different files or subdirectories within a given
directory, nor allow creation but forbid deletion.
The only exception is that if the directory has the sticky bit set
(chmod +t), users cannot move, rename or delete a file or subdirectory
which they do not own.
If the user owns the directory, they can clear this flag, but that may
not be an issue if you're simply trying to prevent accidents rather
than deliberate acts.
However, it may prove problematic if there are plausible scenarios in
which files owned by another user can end up in the directory, as you
can end up with files which can only be removed by root.
> I can't think of a set of UNIX permission or smb.conf directives that is
> going to allow make a directory readonly but allow a group to create
> files within the directory.
Creating files within a directory directly contradicts the notion of
"read only".
You can get slightly more flexibility if you use POSIX ACLs rather
than the historical ugo/rwx permission model. You're still limited to
read/write/execute permission, but you can assign permissions to
multiple named users and to multiple named groups.
Also, Samba has a variety of configuration options which allow the
Unix permission model to be bypassed. E.g. the "dos filemode" option
allows any user with write permission on a file or directory to change
the permissions and/or owner.
--
Glynn Clements <glynn@gclements.plus.com>
next prev parent reply other threads:[~2009-02-16 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 11:46 chattr immutable Dermot Paikkos
2009-02-16 12:30 ` Herta Van den Eynde
2009-02-16 12:48 ` Glynn Clements
2009-02-16 16:18 ` Dermot Paikkos
2009-02-16 20:57 ` Glynn Clements [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-02-16 20:14 Adam Bowen
2009-02-17 11:10 ` Dermot Paikkos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18841.54069.853764.539557@cerise.gclements.plus.com \
--to=glynn@gclements.plus.com \
--cc=Dermot.Paikkos@sciencephoto.co.uk \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).