Can you delete a file in linux without having nor permission or root access?

Thank you.

  • 2
    please elaborate. which folder? you can delete any files without permission in your /home/user/ folder and /tmp/ folder, other than that, big NO. – nickanor Jan 3 '13 at 17:34
  • what about /opt folder? – yassine Jan 3 '13 at 17:35
  • 1
    again, big NO to other folders – nickanor Jan 3 '13 at 17:39
  • 1
    You might be interested in reading How does vim steal root owned files? – gertvdijk Jan 3 '13 at 17:44

You can delete any files without permission in your /home/user/ folder and in /tmp/ folder you can delete some files that aren't owned by root, other than that, big NO.

  • 3
    You cannot delete files that you don't own from /tmp. Only root has that privilege. Why? Because the folder /tmp has the restricted deletion flag set. ls -dl /tmp gives drwxrwxrwt 12 root root 4096 Jan 3 18:05 /tmp The t in drwxrwxrwxt shows this. – Paddy Landau Jan 3 '13 at 18:10
  • yep, i just check that, thanks. i'll update the answer. – nickanor Jan 3 '13 at 18:42

To delete a file ,permissions on files have no importance.To delete a file you should have proper permission (write permission) on directory that is housing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.