2

I have run into a strange issue only recently and scratching my head trying to figure this out.

When compiling (saving) changes in a *.scss file, the outputted css file has its permissions change. So when previewing the page in a browser the global.css file cannot be read and the error message returned is as follows :

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
  <head>
    <title>403 Forbidden</title>
  </head>
  <body>
      <h1>Forbidden</h1>
      <p>You don't have permission to access /styles/global.css
         on this server.</p>
  </body>
</html>

This is when looking at the file global.css via Firebug.

Using terminal I can change the file permissions with something along the lines of:

sudo chmod -R 775 htdocs

Then things work fine until I do a recompile. And the file permission properties changes again.

I have tried many things to fix this issue with no success :

These include

compass clean

and accessing MAMP and changing my permissions this way. I have also tried deleting the folder and starting again a new. I have uninstalled compass and sass and reinstalled, and still the issue exists.

Also as a note the scss permissions don't change but only the compiled css file. I don't know if this helps?

Trevor Saint
  • 51
  • 1
  • 4
  • Open terminal and go to directory with compiled css after running codekit. Execute "ls -lth" and post results. Sounds like codekit is being run as a user that apache doesn't have permission to read from. Post results here please – Richard Denton May 01 '14 at 11:00
  • -rwxrwxrwx+ 1 trevorsaint _www 89446 1 May 15:10 global.css When this is compiled it becomes this -rw-------+ 1 trevorsaint _www 89444 1 May 15:14 global.css – Trevor Saint May 01 '14 at 14:14
  • 1
    It's permission errors between whatever user MAMP is run by, and the user that is running codekit, (trevorsaint_www). Have you tried running MAMP as trevorsaint_www? Alternatively, you could add your user trevorsaint_www to the user group MAMP is running as, and give it R/W permissions. – Richard Denton May 02 '14 at 06:27
  • Hi Richard thanks for your help btw. I can see that MAMP is running as www/sql and I would think that CodeKit is running as me the logged in user trevorsaint. The option available in MAMP other than www/sql is trevorsaint/trevorsaint but no trevorsaint/www. Am I right in thinking Codekit would be running as the logged in user on the computer(me). Thanks again. – Trevor Saint May 02 '14 at 08:27
  • Hi Trevor, did you figure this one out? Thanks, Steve – Steve Jun 01 '14 at 09:47
  • Hi Steve. Sorry for late reply. Yes it was a permissions problem. Thanks. – Trevor Saint Jun 11 '14 at 14:25
  • This has calmed me down!! Thank you – Sam Holguin Oct 18 '14 at 22:16

0 Answers0