user3507560
user3507560

Reputation: 353

Mojave - /Library/Webserver/Documents folder permisisons

I hope someone can help. I have apache running on my mac with my websites loacated at: /Library/Webserver/Documents/mywebsite

It works fine if I go to: http://mywebsite.localhost

... but everytime I try to edit a file in 'mywebsite' directory I get a "{filename} is a locked file and can only be viewed".

If I do a 'get info' on /Library/Webserver/Documents - the result is:

{myuser} : read & write
system : read & write
wheel : read only
everyone : read only

If I do a 'get info' on /Library/Webserver/Documents/mywebsite/index.php - the result is:

{myuser} : Read & write
staff : Read only
everyone : read only

.. but it still says it's locked and read only?

I could move the site folder to /Users/{myuser}/Sites/mywebsite which fixes the problem of permissions but I don't want to have to go to:

http://localhost/~myuser/mywebsite

Can anyone advise?

Upvotes: 0

Views: 2354

Answers (1)

user3507560
user3507560

Reputation: 353

I moved the site folder to

/Users/{myuser}/Sites

which solved the permission problem then added the site to the httpd-vhosts.conf file:

<VirtualHost *:80>
DocumentRoot "/Users/{myuser}/Sites/mywebsite"
ServerName mywebsite.localhost
</VirtualHost>

Which has solved the URL issue:

http://mywebsite.localhost

Upvotes: 1

Related Questions