Cannot Delete file

Ubuntu 22.04.3
Webmin 2.102

Hello,

I’m unable to delete a file with name Bilan_financier_2022-2023_&_Budget_2023-2024LiangD.pdf located in /var/www/mydomain/wwwroot/UserFiles/Upload/FinancialReport using File Manager.

Any help would be much appreciated.

Karl

For sure the user on whose behalf you want to delete that file has no rights.

Are you deleting using the file manager or the command line ?

I do have rights, I’m able to delete other files in the same folder. The file I’m trying to delete as an &amp in the file name.

I justed tried using command line but still unable to delete.

So what does ls show the filename to be ? Jist do ls command in the directory to see the filename … what error did rm give you when you tried to delete

what is putting that nonsense in the filename?
& alone I understand as html code for & but all those other amp; looks like bad programming. → so I can understand why you would like to delete it. I wonder if there are some hidden non-ascii codes (non utf8) in there that the file manager is not interpreting (likewise when you use the apparent filename with rm command it is probably not finding it to delete)

Hence the ls command as that should escape all odd ball chrs in the filename so to delete you just copy the exact output from ls including the \'s that are in the file name

Thanks,

It worked using command line

Regards,

Karl

What was the exact file name when you deleted using CLI?

OP would probably have to use the history command to know that. Probably did a ‘tab’ completion.

‘Bilan_financier_2022-2023_&_Budget_2023-2024LiangD.pdf’

Was it the file name displayed in the CLI, i.e. if you ran ls -lsa … would that display that exact name?

When I used ls the file name displayed single quotation marks at the beginning and end of file name.

Can you show a screenshot of how it looked exactly?

I see now. This is the bug that we will fix in the next Webmin 2.103 release.

Thanks for the heads up!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.