3

After running Migration Assistant (from a 2021 MacBook, reformatted and built from scratch last week, onto a 2018 MacBook, reformatted today), a folder named “Sites” has appeared in my Home directory (~/Sites). I have never seen this before. I cannot trash or rename it, though Finder claims I have full read/write permissions. I’m running the latest macOS, 14.5 Sonoma. Apple’s phone support seems stumped.

  • What is this folder’s intended purpose?
  • Is there any safe way for me to remove it?
  • If I can’t delete, can I use it to hold any kind of files anything I want?
6
  • That’s a blast from the past! Way back in the day, it held web pages for iWeb. How old was the source from which you migrated? We can probably dismiss #1 as part of old home folder and #3 as not a good idea (but yes you could). I’d store things elsewhere until we can sort out #2
    – bmike
    Commented Jul 25 at 0:49
  • The source was built from scratch last week. Why would #3 be bad?
    – 5260452
    Commented Jul 25 at 3:03
  • macOS includes the Apache web server - the Sites folder is still used when setting up a local server.
    – red_menace
    Commented Jul 25 at 3:49
  • @red_menace said, "macOS includes the Apache web server". Can I ask when this started? My Ventura system (macOS 13) doesn't have this ~/Sites folder.
    – Seamus
    Commented Jul 25 at 4:54
  • 2
    @Seamus The following is all suject to the unreliability of my memory: I think the web server and ~/Sites folder were there in Mac OS X v10.0 (i.e. since the beginning of OS X). There was originally a checkbox to activate it in the Sharing preferences, but that got removed in v10.8 (but the service could still be activated from the command line). The ~/Sites folder hung around a few versions after that, not sure when it was removed. The Apache server software is still there, and likely to remain. Commented Jul 25 at 8:42

1 Answer 1

4

Your three questions about ~/Sites:

What is this folder’s intended purpose?

macOS includes the Apache web server (disabled by default) and ~/Sites is the default location for any web sites. I also use mine to store web sites which don't use a web server, rather accessed directly from Finder.

Is there any safe way for me to remove it?

You are having difficult removing it because it has an Access Control List (ACL) with an entry denying delete. Command ls -le ~ shows that my ~/Sites has an ACL with just one Access Control Entry (ACE) 0: group:everyone deny delete.

So before deleting it you need to remove the ACL. I believe this old Q&A is still correct https://superuser.com/questions/299758/what-is-the-mac-terminal-command-to-remove-acl

Use the chmod -N ~/Sites to completely remove the ACL. But first read man chmod which describes setting and manipulating ACLs and their ACEs.

If I can’t delete, can I use it to hold any kind of files anything I want?

Though you can delete it, you can keep it and use it hold anything you want.

If at some time in future you were to enable the Apache web server, the content of ~/Sites would become visible. That might be enough reason not to use it for your files without some forethought.

0

You must log in to answer this question.

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