ICloud – Permissions keep changing on Desktop

apachehigh sierraicloudpermission

I am running a Apache2 on my MBP on macOS 10.13.6. I setup everything well, and it works when going to localhost/~user. In my ~/Sites folder, I have a symbolic link to a folder on my Desktop with my website files in it. I can navigate to the website with localhost/~user/mysite only sometimes. If I get a 403 error, it is fixed with running chmod a+x ~/Desktop. This fixes it until about the next reload, but almost every time I make a change and try to reload the site, I have to run the chmod command. I use Brackets for my web editing, and I have iCloud Drive syncing enabled for the Desktop folder. I think that it is either the iCloud Drive resetting permissions for the folder or Brackets doing something weird. Has anyone had a similar problem and fixed it? This is really annoying and it's slowing down my development.

EDIT: My httpd.conf file: pastebin

EDIT: It seems my question was unclear, but what I was asking is why the permissions keep changing on my ~/Dekstop folder. I do chmod a+x ~/Desktop and it fixes my apache 403 errors, but after about a minute this changes and I have to run the chmod command again. I was thinking it might be iCloud Drive sync changing something, or Brackets messing up permissions.

Best Answer

I had the same problem with the Documents folder. I solved it by using ACLs to grant access.

chmod +a "_www allow list,search" Desktop

For more information, see my answer to a similar question.