Search code examples
silverstripesilverstripe-4

Silverstripe4.0.3 file permissions after installation


I have installed SilverStripe 4.0.3 on a webserver and at the end of the installation this message is displayed:

"After the install, the assets directory is the only directory that needs write access."

When I try to search for information on what kind of file permissions I should set manually (if any), I can't find anything.

This is how the permissions look like after the installation:

 drwxrwxr-x  3 myuser myuser       4096 Feb 11 21:56 assets
-rw-rw-r--  1 myuser myuser       907 Feb 11 21:49 composer.json
-rw-rw-r--  1 myuser www-data     133925 Feb 11 21:49 composer.lock
-rw-rw-r--  1 myuser myuser       1406 Feb  5 05:15 favicon.ico
-rwxrwxr-x  1 myuser www-data     535 Feb 11 21:53 index.php
-rw-rw-r--  1 myuser www-data     1221 Feb 11 21:49 install-frameworkmissing.html
drwxrwxr-x  4 myuser myuser       4096 Feb 11 21:49 mysite
-rw-rw-r--  1 myuser myuser       854 Feb  5 05:15 phpcs.xml.dist
-rw-rw-r--  1 myuser myuser       1804 Feb  5 05:15 README.md
drwxrwsr-x  3 myuser www-data     4096 Feb 11 21:49 resources
drwxrwsr-x  3 myuser www-data     4096 Feb 11 21:49 themes
drwxrwsr-x 25 myuser www-data     4096 Feb 11 21:49 vendor
-rw-rw-r--  1 myuser www-data     585 Feb 11 21:49 web.config

For example, is the file permissions on the "resources" folder wrong here?


Solution

  • Those permissions look fine. The installer tells you it needs those permissions just in case something went wrong when setting the permissions on the assets folder.

    The message states it's the only directory that needs to be writable. It does not mean other folders shouldn't be writable.