Odd rm Experience

18 views
Skip to first unread message

Paul Boniol

unread,
Jan 5, 2021, 6:35:11 PM1/5/21
to NLUG
I listened to an mp3 (recorded from the earlier adventure in automatically running VLC). Close VLC.

I went to delete the file in Thunar file manager, and the delete and trash options were grayed out for the file. So I went to the command line, cd'd to the directory.
ls -lh filename
-rw-rw-r-- 1 paul paul 220M (etc.)

rm filename
rm: cannot remove 'filename': Permission denied

I was immediately able to sudo rm the file. My first thought was somehow I didn't have write permission, but I'm logged in as the file owner, and it obviously says I have user and group write permission.

Any thoughts on what could cause this?  (That file is gone now, so I can't do any other prodding, and I'm not ready to delete another from the directory yet.)

Paul

Paul Boniol

unread,
Jan 5, 2021, 6:45:10 PM1/5/21
to NLUG
Of course right after I hit send I had another thought. I have a possible answer. 

Somehow I was not the owner of the directory the file was in, and didn't have write permission to the directory (drwxr-xr-x), even though I owned and had write permission to the file. That has been corrected, still have to wait to see, but I think that should fix it.

Paul

Kent Perrier

unread,
Jan 5, 2021, 6:45:54 PM1/5/21
to nlug-talk
What about the permissions on the directory?

--
--
You received this message because you are subscribed to the Google Groups "NLUG" group.
To post to this group, send email to nlug...@googlegroups.com
To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en

---
You received this message because you are subscribed to the Google Groups "NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nlug-talk/CAL9PgS3YjYEknC5aiDAkpaRp-rUiJFB%3DNm%3DWsOj6kFXmJDwODg%40mail.gmail.com.

Tilghman Lesher

unread,
Jan 5, 2021, 6:46:52 PM1/5/21
to NLUG
Paul-

Check out the manpage for unlink(2). There are multiple possible
reasons. All of the possibilities are listed there.

-Tilghman

On Tue, Jan 5, 2021 at 5:35 PM Paul Boniol <paul....@gmail.com> wrote:
>
> --
> --
> You received this message because you are subscribed to the Google Groups "NLUG" group.
> To post to this group, send email to nlug...@googlegroups.com
> To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "NLUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/nlug-talk/CAL9PgS3YjYEknC5aiDAkpaRp-rUiJFB%3DNm%3DWsOj6kFXmJDwODg%40mail.gmail.com.



--
Tilghman

dbacus67

unread,
Jan 5, 2021, 7:33:07 PM1/5/21
to nlug...@googlegroups.com
Hey Paul. Happy New Year!

Creating and removing files are dependent upon directory permissions, not file permissions, as you are modifying the contents of the directory.

Hope this helps!

Dan
--

Csaba Toth

unread,
Jan 5, 2021, 8:19:55 PM1/5/21
to nlug...@googlegroups.com
My 2 cents: are you sure when you closed VLC it died completely with all of its child processes?

--
Reply all
Reply to author
Forward
0 new messages