Article 6H9VB Couldn't delete messages on server. Why not?

Couldn't delete messages on server. Why not?

by
Pedroski
from LinuxQuestions.org on (#6H9VB)
I have a little Ubuntu 22.04 cloud server.

I couldn't get it to send email, so I just save messages from the contact webpage to the server using php and download them with a bash script. I only get a few messages, it's not very active.

I usually upload or delete files using Filezilla.

In the folder

Quote:
/var/www/mywebpage.com/public_html/contact/messages
I had 3 messages from people who wanted to improve my webpage for me. I could not delete them.

Below is from Filezilla:

Quote:
Command:rm "/var/www/mywebpage.com/public_html/contact/messages/Mike Adamson mikeDupdooks@gmail.com05 Dec 2023 08:39:17.txt"
Error:rm /var/www/mywebpage.com/public_html/contact/messages/Mike Adamson mikeDupdooks@gmail.com05 Dec 2023 08:39:17.txt: no such file or directory
Command:rm "/var/www/mywebpage.com/public_html/contact/messages/Mike Cramer petercoopsypose@gmail.com13 Dec 2023 08:34:01.txt"
Error:rm /var/www/mywebpage.com/public_html/contact/messages/Mike Cramer petercoopsypose@gmail.com13 Dec 2023 08:34:01.txt: no such file or directory
Command:rm "/var/www/mywebpage.com/public_html/contact/messages/Mike Edwards mikeDupdooks@gmail.com09 Dec 2023 01:12:43.txt"
Error:rm /var/www/mywebpage.com/public_html/contact/messages/Mike Edwards mikeDupdooks@gmail.com09 Dec 2023 01:12:43.txt: no such file or directory
Status:Deleting "/var/www/mywebpage.com/public_html/contact/messages/Mike Edwards mikeDupdooks@gmail.com09 Dec 2023 01:12:43.txt"
Why couldn't I delete them?

Trial messages from myself or friends didn't have this problem, I can delete them in Filezilla, no problem.

Was it the spaces in the file names?

I connected to my cloud server using ssh, went to the directory with the messages and used rm:
Code:rm -v *I got this message each time:

Quote:
rm: remove write-protected regular file 'Mike Adamson'$'\r\n''mikeDupdooks@gmail.com05 Dec 2023 08:39:17.txt'?
When I entered y, the file was deleted! As far as I could see, these messages had exactly the same permissions as the files I could delete.

How to do this in a better way?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments