Changing permissions of ~/Library/Mobile Documents (which is blocked in Sonoma)

Object

I want to change permissions of the folder "~/Library/Mobile Documents," but the change is blocked in Sonoma for some unknown reason.


Background

To create a website test environment, I set up my older (Big Sur or Monterey) MacBook Air to have, via Apache, "DocumentRoot" defined as "~/Library/Mobile Documents/com~Apple~CloudDocs/mytestsite/," and "ServerName" as "localhost."


By doing so, I have constructed the test environment reflecting a real server by accessing "https://localhost/," which has been working perfectly.


Problem

However, once I upgraded a new MacBook Air with Sonoma, and when reconstructing such an environment, an access to "https://localhost/" returns 403 Forbidden error. The apache log says:


... (13)Permission denied:... AH00035: access to / denied

(filesystem path '/Users/myname/Library/Mobile Documents/com~apple~CloudDocs')

because search permissions are missing on a component of the path.


This may apparently be caused by inappropriate permissions on any one of the folders starting from "~/Library" down to "/mytestsite/." From my (and many other people's) experiences, these folders should have 755 permissions.

Thus, I changed the permissions of every folder along the path, and the permissions were correctly changed to 755, except for the folder "Mobile Documents."


The folder "Mobile Documents" wouldn't accept the permission change to 755. In spite of a command "chmod 755" for the "Mobile Documents" with and without sudo in "Terminal," no error was returned, but its permissions were never changed.


Probably if this permission change is accepted, the 403 Forbidden error is expected to go away.

How can I change the permission of "Mobile Documents"? It now has a permission like this:

dr-x------+ 54 myname mygroup 1728 9 8 2023 Mobile Documents

(It might be natural that this folder does not accept the permission change because it has no owner write permission.)


Any little bit of information would be appreciated.


(P.S. I posted the same question to Japanese Apple community. But unfortunately, no one respond to it, so I came here.)



MacBook Air 13″, macOS 14.6

Posted on Apr 3, 2025 12:40 AM

Reply

Similar questions

2 replies

Apr 4, 2025 06:38 PM in response to mijinco

In macOS you have to always remember that the filesystem is protected by both standard permissions as well as ACLs. That "+" in the permissions listing that you see using ls (dr-x------+) means that the directory also has ACLs. You can see ACLs using ls -e or more easily by simply using the "Get Info" dialog for the directory. "Sharing & Permissions" will be shown at the bottom. Make sure that the user that Apache is running as has access to that directory by setting appropriate ACLs.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Changing permissions of ~/Library/Mobile Documents (which is blocked in Sonoma)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.