givanz / Vvveb

Powerful and easy to use cms to build websites, blogs or ecommerce stores.
https://www.vvveb.com
GNU Affero General Public License v3.0
239 stars 49 forks source link

Permissions for files and folders #97

Open Twilight-Computer opened 3 months ago

Twilight-Computer commented 3 months ago

I have installed my software manually (not using Docker) and found limited information about file / folder permissions.

I found / modified the following information in the Docker files - can anyone confirm is this is correct and complete, to set permissions ?

chown -R apache:apache Path_to_Website_root chmod -R 555 Path_to_Website_root chmod -R 666 Path_to_Website_root/storage chmod 555 Path_to_Website_root/storage chmod -R 644 Path_to_Website_root/public chmod 555 Path_to_Website_root/public chmod -R 644 Path_to_Website_root/config chmod 555 Path_to_Website_root/config

chmod -R 666 Path_to_Website_root/plugins chmod -R 666 Path_to_Website_root/storage/cache chmod -R 666 Path_to_Website_root/storage/digital_assets chmod -R 666 Path_to_Website_root/public/image-cache

givanz commented 3 months ago

Folders that need write permission is checked at install, you can view the list here

https://github.com/givanz/Vvveb/blob/master/install/controller/index.php#L40

Write permission is also needed for themes files for template editing, media uploads, compiled templates and model generation.

chmod -R 666 Path_to_Website_root/public/themes
chmod -R 666 Path_to_Website_root/public/media
chmod -R 666 Path_to_Website_root/storage/compiled-templates
chmod -R 666 Path_to_Website_root/storage/model
Twilight-Computer commented 3 months ago

I made these changes and most of the site become inaccessible. I needed to change most to 776 to regain access ?

givanz commented 3 months ago

Sorry I didn't pay attention to flags on some folders.

Files inside model and compiled templates are generated php scripts and need to have execute flag for php to include them.

chmod -R 776 Path_to_Website_root/storage/compiled-templates
chmod -R 776 Path_to_Website_root/storage/model