I am on ubuntu 18.04.

I have a folder (self-created project for website), that is locked.

Only root has access to create and delete.

I did following on folder:

  • sudo chmod 777 on folder to release the lock (that worked)
  • then put folder in trash and empty trash with sudo rm -rf ~/.local/share/Trash/* (that worked)

2 minutes later the folder is back where it was... :(

I even tried removing it with nautilus (root access), put in trash, empty trash (all worked), and again 2 minutes later the folder reappeared.

What to do?

Update: Yes, it could be because of the nodejs framework recreating it, if so, how to stop it?

  • 1
    Which folder? May it be recreated by the website framework?
    – vidarlo
    Feb 24, 2019 at 13:52
  • Should have comment perms now we upvoted you. Delete your answer below. Feb 24, 2019 at 14:04
  • If it is your framework or some application recreating it, you have to figure out where in the code that happens, and modify that part. It's also a fair chance there's a good reason why it gets created. What is the name of the folder?
    – vidarlo
    Feb 24, 2019 at 14:24

1 Answer 1


Please try doing

  1. Type: sudo su[this will ask you to enter the login password]

  2. Once password entered

  3. write this command: chmod a+rwx folder/file [copy the parent location from properties then /folder name(which is locked)]

Now, go to home and just delete the folder/file.

Exit for root user type exit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.