Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] File delete permissions.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/08/2017 07:58 PM, Carlos E. R. wrote:
I'm user 'cer'. To avoid deleting by mistake some files, I changed their
ownership to another user:

cer@Isengard:~/Fusion/Videos/Crossing Jordan/Temporada 1> l p*mpeg -rw-r--r--
1 cer-g root 0 Jun 8 19:50 p.mpeg
-rw-r--r-- 1 cer-g root 0 Jun 8 19:50 p2.mpeg -rw-r--r-- 1 cer-g root 0 Jun
8 19:50 p3.mpeg -rw-r--r-- 1 cer-g
root 0 Jun 8 19:50 p4.mpeg cer@Isengard:~/Fusion/Videos/Crossing
Jordan/Temporada 1> rm p.mpeg rm: remove
write-protected regular empty file 'p.mpeg'? n
cer@Isengard:~/Fusion/Videos/Crossing Jordan/Temporada 1>


See? 'rm' doubts and asks. However, 'mc' doesn't ask and goes ahead, it
happily deletes a file that is not mine.

I thought that the 'w' permission was needed to delete a file, but no. Is
there some way I can negate user "cer"
permission to delete a file? No, not sticky, it doesn't work.

You could change the directory permissions to 1777 (as '/tmp'),
so only the owner of a file may delete it (or root, of course).

The question is, how - i.e., by whom - files are added.
If you add all files with uid:guid = 'cer-g:root', and the
containing directory is also owned by that user and has the
permisssions 0755, then user "cer" won't be able to remove
the files either. Then no special bits are neccessary.

Have a nice day,
Berny


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJZOdCPAAoJEEZQLveWkXGVVDoH/jzefOKMtq7wnpV2N8c6Jek2
1iZ9UmsW5mUo1Ol45eHfwqkMVnnk5k/AdlCdjbZf6Af545C60L9ssxNR9Z83SWfI
iIgbqfPJ/DtheiWnJVOmlEabCm2c2TIrHk66E++GCUn9FBK7+DA3DwFkMcBRfe7Z
jF/frVs47Vx2LuCgk5pc5BmMw/r3x6ALQiwDBzEza0dgx8XeuUmDSxGE5KVFc+da
3XhSgjP6bYWIQz8YloB1ktFkbQa0D+nno5gnUYdLcjUeTVw/yh6uWN8nCw2jcL+0
ho0VpDlkHnyBvUgaFmZOlV8j8uXs0rQkp2x4/48RX+68/TeGZDFYgk3SRf7I81I=
=aNZK
-----END PGP SIGNATURE-----

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

< Previous Next >
Follow Ups
References