On Thu 28 Oct 2021 at 17:04:59 (+0100), Tixy wrote: > On Thu, 2021-10-28 at 17:48 +0200, Hans wrote: > > Oh, and I forgot to mention or make clear: > > > > The file /var/mail/myusername does not be reduzed to 0, and as the user > > myusername I can not manually delete this file, although (if I am not > > wrong!), > > I should be able to, as it is rw for me. > > You can't delete the file because that requires modifying the directory > containing it, i.e. /var/mail/ and you don't have permissions for that. > These are the permissions you showed us... > > ls -la /var/mail/ > drwxrwsr-x 2 root mail 4096 28. Okt 15:12 *.* > drwxr-xr-x 13 root root 4096 2. Sep 18:37 *..* > -rw-rw---- 1 myusername mail 2090109 28. Okt 15:02 myusername > > So /var/mail/ has owner 'root', group 'mail', and isn't writeable by > others. > > You do have permission to modify the contents of file 'myusername' as > you are the owner, and owner has write permission set.
I think the OP has some difficulty with this concept, as they have made the same statement, had it corrected by Greg, and disputed it, as recently as May 6 and July 8 this year. I just tried changing the permissions on /var/mail/ to drwxr-sr-x 2 root mail 4096 mail and it seems unlikely that this is the OP's problem. The OP reports that they successfully marked messages as deleted, and was asked whether to actually delete them. Mutt would have marked the Index page with %, ie readonly, and objected to marking messages with the delete flag because mutt_dotlock would already have failed to create and delete a lockfile, viz: $ inotifywait -m /var/mail/ Setting up watches. Watches established. [ … ] [ Open /var/mail/username in mutt ] [ … ] /var/mail/ CREATE username.hostname.6695 /var/mail/ OPEN username.hostname.6695 /var/mail/ CLOSE_WRITE,CLOSE username.hostname.6695 /var/mail/ CREATE username.lock /var/mail/ DELETE username.hostname.6695 [ … ] /var/mail/ DELETE username.lock [ Mutt awaits user keystrokes ] If those lines are absent, the mailbox status is immediately shown as readonly (%). Disclaimer: I tried all this out just to generate a log of normal behaviour. (I try to keep good records of my unusual email setup.) This assumes that the system is as per Debian. I notice: https://lists.debian.org/debian-user/2016/10/msg00910.html Cheers, David.