Search code examples
macoswebfile-permissions

Fix permissions for website directory mac osx 10.9


I have apparently messed up the permissions of my development environment and can no longer get the web site i'm working on to come up with localhost. There are a lot of files to fix and I do not want to have to try to fix them all manually through finder. Is there a way to fix them all at one time? I'm sure there is a command pompt I could use but I'm not that familliar with comman line.

I am on a Mac running OSX 10.9

Help please


Solution

  • This is an wasy one to fix, especially for wordpress permissions. Open up a terminal (/Applications/utilities/terminal.app). You would then change directory to where you keep your development sites.

    cd /path/to/where/you/keep/your/Site
    

    Then issue the following two commands in you site's directory

    find . -type d -print0 | xargs -0 chmod 755 
    find . -type f -print0 | xargs -0 chmod 644
    

    This will recursively set permissions to what apache expects.