I accidentally ran a PHP script that creates a directory with permissions 0777 and I am now unable to delete this directory. Any help to delete it would be appreciated, I have inserted a picture of the directory info below.

directory info

  • Please open Terminal, type ls -dl , drag&drop the parent folder of the one you want to delete onto Terminal, press Enter and add the Terminal output to the question – nohillside Jul 5 '20 at 16:58

If you're on an admin account, you should be able to click the lock, supply password, then click the + sign & add yourself as read/write.

If it won't let you do that, then try on the next folder up the hierarchy, setting permissions to at least add yourself as read & write, then click the 'gearbox' icon & 'apply to all enclosed items'.

  • Unfortunately, this doesn't work. When applying to all enclosed items, nothing changes. When attempting to add myself I receive the same "you do not have permissions" message. – Grufeling Jul 5 '20 at 16:25
  • Sorry, then I'm completely stumped - 0777 should already be "rwx perms for everyone" – Tetsujin Jul 5 '20 at 16:55
  • The permissions on the containing directory are what matter, not the permissions on the object you're trying to remove. – Marc Wilson Jul 5 '20 at 19:09
  • @MarcWilson - I'd thought that was implicit - but looking back it may not in fact be as clear as I'd thought - will amend. – Tetsujin Jul 5 '20 at 19:11
  • 1
    This whole .../lampp/htdocs/uploads hierarchy seems to have bogus permissions... why would ONLY daemon have r/w there? The answer to @nohillside 's request will be interesting. – Marc Wilson Jul 5 '20 at 19:21

You must log in to answer this question.

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