Re: Can not delete file with correct permissions
Am Donnerstag, 6. Mai 2021, 17:45:29 CEST schrieb Hans:
I am answering myself: I was wrong, on the other computer rm and touch do also
not work.
BTW: I stumbled over this issue, because mutt could not delete my mails due to
the permissions (but at the other computer it works), so I tried all the steps
manually. Maybe there is also another failure besides my thinking. :)
Best
Hans
> Tomas,
>
> but when you are correct, why is it working on another computer wwith
> exactly the same permissions set? On that other computer it is working
> well, and I can not see a difference between both.
>
> Cheers
>
> Hans
>
> > > 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
Reply to: