This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

FluxCapacitor
FluxCapacitor

What permissions should be used for an October CMS project on a shared production server? Is there a simple, step-by-step procedure for newbies?

Thanks in advance.

Background info: I'm on a shared CentOS server with Apache 2.

For security, I'm planning to put the index.php file etc into a "public" folder, as described in these instructions: https://octobercms.com/docs/setup/configuration#public-folder

Back in 2012, this forum thread:

http://stackoverflow.com/questions/11981621/starting-with-laravel-on-ubuntu

suggested the following settings for Laravel:

set

chmod 755 -R laravel

and then

chmod -R o+w storage

I wonder if those two lines should be run exactly as they are. The words "laravel" and "storage" don't seem right to me. Does anyone know?

For beginners like me, here's what chmod 777 means:

https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/

Last updated

KurtJensen
KurtJensen

My host will not allow 777. I run my October site as 755 without issues.

FluxCapacitor
FluxCapacitor

KurtJensen said:

My host will not allow 777. I run my October site as 755 without issues.

So the exact syntax to use is this?

chmod 755 -R my_project_directory
fatshark
fatshark

On shared hosts you usually want files 644, folders 755.

find . -type d | while read folder ; do chmod 755 "$folder" ; done
find . -type f | while read file ; do chmod 644 "$file" ; done

From: http://www.linuxquestions.org/questions/linux-general-1/chmod-all-files-644-and-files-755-a-542059/

FluxCapacitor
FluxCapacitor

Thanks fatshark.

JSokol
JSokol

Or a shorted version to run inside project directory:

find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.