Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] File delete permissions.
  • From: "Carlos E. R." <robin.listas@xxxxxxxxx>
  • Date: Wed, 14 Jun 2017 12:52:52 +0200 (CEST)
  • Message-id: <nycvar.YFH.7.76.1706141251030.30027@Grypbagne.inyvabe>
Hash: SHA1

Delayed mail. I had to resend it, my ISP is playing tricks on me.

On Friday, 2017-06-09 at 12:11 +0200, Bernhard Voelker wrote:
On 06/09/2017 03:02 AM, Carlos E. R. wrote:
On 2017-06-09 00:32, Bernhard Voelker wrote:
On 06/08/2017 07:58 PM, Carlos E. R. wrote:

No, user "cer" owns the directory and creates the files. Later on, I
manually change (chown) finished files to "cer-g" with the idea that
they are not altered by accident.

So, now the directory is sticky, owned by cer, and still 'mc' deletes
files owned by cer-g without question.

If you manually chown the file later, you need to do this as root anyway.
So you could just chown the directory to root. After that, the 1777 permission
on the directory would prevent the user 'cer' from removing files owned by

This is exactly like /tmp: just try to remove a file owned by someone else
(and with a non-root user, of course).

Let's see.

cer-g@Isengard:~> touch /tmp/test
cer-g@Isengard:~> logout
cer@Isengard:~> rm /tmp/test
rm: remove write-protected regular empty file '/tmp/test'? n

And mc can't delete it either, so you are right.

The problem is, I do not control the directories, they are created by
another program (closed source). I don't know if it will create again
the directories or will have another issue with ownership. Might work,

So, now I have two methods: your's, or the 'i' attribute.

I could probably chown the directory not to 'root', but to 'cer-g'

- -- Cheers,
Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

Version: GnuPG v2


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >