On Thu, May 06, 2021 at 05:25:02PM +0200, Hans wrote:
> Dear list,
>
> I am stuck with an issue, I can not explain what is wrong.
See below:
> System: Debian-amd64/testing
> Problem: I can not delete or create a file as normal user, though the permissions seem to
> be set right.
>
> Description: As the normal user I "testuser" want to delete the file /var/mail/testuser
>
> However I get the "no Permission" error and can not delete it. It is also not possible, to
> create a new file using vi or touch.
>
> Permissions are looking good for me, please take a look:
> ls -la /var/mail/testuser
> -rw-rw---- 1 testuser mail 382182 6. Mai 17:02 /var/mail/ullhan63
>
> ls -la /var/mail
> insgesamt 384
> drwxrwsr-x 2 root mail 4096 6. Mai 17:02 *.*
^
This is it
> drwxr-xr-x 13 root root 4096 6. Mai 16:17 *..*
> -rw-rw---- 1 testuser mail 382182 6. Mai 17:02 testuser
As testuser you don't have write permission to /var/mail. To remove
a file from that directory (i.e. /var/mail/ullhan63), you would need
to change (i.e. write to) the directory.
You can, as testuser write to the file /var/mail/ullhan63, but you
can't remove it.
You could make it empty by
echo -n '' > /var/mail/ullhan63
or some moral equivalent.
Cheers
- t
Attachment:
signature.asc
Description: Digital signature