why can't delete the file?
Try
rm 'D:\XAMPP\htdocs\magento_41\magento\'
backslashes are special in the shell (escaping)
Linux can't delete files
Why not thus:
find /root -type f -name '* *' -exec rm -f {} ';'
Unable to delete files in shared filesystem
It seems that it's a design limitation of Azure Web Apps. Any files in the shared file system held open by the application (even just for read) will not be writable or delete-able. The only option is to re-engineer the app to store such files somewhere other than the shared file system.
I suspect this issue is exacerbated by the shared file system being hosted on Windows. On a Unix system, a file can typically be removed even if it's open by another process. So for users of Web Apps For Containers, it's an extra surprise that files cannot be deleted, and thus they simply linger without an error.
Why can non-superuser delete files created by root?
Deletion of a file requires write access to the directory that contains the file, not the file itself. You just have to keep in mind what an operation does. Deletion doesn't involve any changes to the file you're deleting, it just involves removing the pointer to it from the directory "file" that it's in.
Were you to open the file for write and attempt to change one of its bytes, you would see that it is protected from you. Note, this may be different to editing the file since that can be done by reading it, deleting the original, then writing a new copy (all of which can be done with read access to the file and write access to the directory).
And, no, it's not really dangerous since secure systems also protect the directories that contain real system files, such as /etc
:
pax@paxBoxA> ls -ld /etc
drwxr-xr-x 1 root root 4096 Oct 11 14:45 /
Can't remove a directory in Unix
Try to delete it with root user or use sudo, if you are in trouble
Use rm -rf dir
with root account and it will be deleted, since you should be facing a permissions issue.
Related Topics
How to Mount a Directory Inside a Docker Container on Linux Host
How to Change the Permissions in Openshift Container Platform
How to Hide Password from Jenkins Shell Output
Django on Apache Wtih Mod_Wsgi (Linux) - 403 Forbidden
Why Can't Cuda's Examples Makefile Find the Cuda Libraries
Ada Compiler Crashes with "Ada Compiler Not Installed on This System." After Downgrading Gcc Version
Unusual Behaviour of Linux's Sort Command
Run Bash Script in Raspberry Pi via Ifttt
Bash Assign Output to Variable Inside Here Document
How to Stop Apache from Listing the Contents of My User Directories
How to Automate Measuring of Bandwidth Usage Between Two Hosts
Eliminate Unwanted Output Using Awk and Sed
Overriding the Variable in Distro.Conf Config File in Custom Image Recipe Yocto
Why Would the Elf Header of a Shared Library Specify Linux as the Osabi