Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your .../wordpress/tools/script.sh shell file deleted all my files inside my docker machine #2

Open
TeomanDeniz opened this issue Jul 24, 2024 · 0 comments

Comments

@TeomanDeniz
Copy link

TeomanDeniz commented Jul 24, 2024

At script.sh, when you're doing

mkdir /var/www/
mkdir /var/www/html
cd /var/www/html
rm -rf *

the rm -rf * part literally deleted all my files.

That's happened while the program was running mkdir /var/www/ and mkdir /var/www/html commands. And then I noticed that I am out of memeory and failed to create the folders and that caused cd /var/www/html to fail.

Then when we get to rm -rf * command, as you see it's literally deleting all files on / (root) directory in that case.

For fixing that, just please add certain directory to rm command, this is really not safe.

rm -rf /var/www/html/*
@TeomanDeniz TeomanDeniz changed the title Your .../wordpress/tools/script.sh shell file deleted all my filres inside my docker machine Your .../wordpress/tools/script.sh shell file deleted all my filesinside my docker machine Jul 24, 2024
@TeomanDeniz TeomanDeniz changed the title Your .../wordpress/tools/script.sh shell file deleted all my filesinside my docker machine Your .../wordpress/tools/script.sh shell file deleted all my files inside my docker machine Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant