0

I am trying to remove a file with:

ubuntu64@ubuntu:/usr/local/mongodb$ rm /usr/local/mongodb/*

But every time it just outputs:

rm: cannot remove ‘/usr/local/mongodb/mongodb-linix-x86_64-2.6.4’: Permission denied

Why am I getting this error and how can I fix it?

2 Answers 2

2

Use sudo

sudo rm rm /usr/local/mongodb/*

See https://help.ubuntu.com/community/FilePermissions

and

https://help.ubuntu.com/community/RootSudo

for additional information

1

The Permission denied bit means that you do not have to correct permissions to perform this action. To raise your permissions for the execution of that command try running it with sudo:

ubuntu64@ubuntu:/usr/local/mongodb$ sudo rm /usr/local/mongodb/*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .