Jump to:

4952 Posts in 16054 Topics by 1489 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » A file permissions error has occurred. (moving instance into root directory)

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 735 Views
  • Miss Aran
    Avatar
    Community Member
    1 Post

    A file permissions error has occurred. (moving instance into root directory) Link to this post

    Hi there,

    I'm super new and I've given the task to get a silverstripe website up live on my first few days here so I'm completely new to silverstripe!

    Problem I have is the the dev site was hosted in a subdirectory of the clients shared server. I have tried to take a backup and move the files into the root and change the rewrite mod to / like below.

    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    ErrorDocument 404 /assets/error-404.html
    ErrorDocument 500 /assets/error-500.html

    <IfModule mod_alias.c>
       RedirectMatch 403 /silverstripe-cache(/|$)
    </IfModule>

    <IfModule mod_rewrite.c>
       SetEnv HTTP_MOD_REWRITE On
       RewriteEngine On
       RewriteBase /

       RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>
    ### SILVERSTRIPE END ###

    I assumed this would be easy (from reading other solved issues with .htaccess and moving instances to different directories) however I am faced with this error when I view the home root of the site.

    A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.

    Now if I take away the htaccess the error doesn't appear but my silverstripe doesn't kick in.

    I have tried my UTTER best to get the file permissions right from the dev site (which I didn't build and the developer vanished) but I have a feel it has to be more than that.

    I also checked my log files and it gives me this error:

    suexec policy violation: see suexec log for more details

    ..... no idea :/

    Any help to troubleshoot this would be MUCH appreciated.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: A file permissions error has occurred. (moving instance into root directory) Link to this post

    Doing a search for "suexec policy violation" points to a need to set the file permissions correctly. One example hinted at changing the file permissions to "755" or "750". What permissions are the files currently set to?

    Keep in mind the "assets" folder needs read and write access by the web server user, all the other files the web server user just needs to read.

    I know it's not the easiest thing to fix when you're new to this!

    Sean

    735 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.