From: Rahul on
Is there a way (under ext3) to set permissions on a dir such that:

only user can create new files
but anyone in the group can delete files


--
Rahul
From: unruh on
On 2010-02-14, Rahul <nospam(a)nospam.invalid> wrote:
> Is there a way (under ext3) to set permissions on a dir such that:
>
> only user can create new files
> but anyone in the group can delete files

No. By "user" I presume you mean the owner of the directory.

The group r on the directory means anyone can read the names of files in
the directory, the w, means anyone in the group can put new names into
the directory (ie create a file) and x means anyonei in group can get at the files
to do something with them, and the t means only the creator of the file
can remove it from the directory. .


>
>
From: J G Miller on
On Sun, 14 Feb 2010 00:42:54 +0000, Rahul wrote:

> Is there a way (under ext3) to set permissions on a dir such that:
>
> only user can create new files
> but anyone in the group can delete files

This is a very strange scenario so it begs the question why would you
want such a thing to be possible?

If a user can delete a file, then the user has write permission to
the directory in which case the user can create a file.

The only time a user can create a file and not delete a file is if
the user has write access to a directory owned by somebody else and
the sticky bit is set on the directory.

But how about this possible solution -- the other users have read and
write permissions to the directory so they can see and delete files, but
they have a quota set for them on the file system where the directory is
located which is 0 (soft and hard limit), so that way they cannot create
new files (or possibly just empty ones)?

<http://linux.about.COM/library/cmd/blcmdl1_quota.htm>
From: AZ Nomad on
On Sun, 14 Feb 2010 00:42:54 +0000 (UTC), Rahul <nospam(a)nospam.invalid> wrote:
>Is there a way (under ext3) to set permissions on a dir such that:

>only user can create new files
>but anyone in the group can delete files

man chmod
From: Robert Riches on
On 2010-02-14, Rahul <nospam(a)nospam.invalid> wrote:
> Is there a way (under ext3) to set permissions on a dir such that:
>
> only user can create new files
> but anyone in the group can delete files

As other responders have stated, there's nothing in the
filesystem permission bits that will give you this. However, you
might be able to use sudo to give other users a way to remove
files from the directory. Be careful, though.

--
Robert Riches
spamtrap42(a)verizon.net
(Yes, that is one of my email addresses.)