File permission settings in the config file

in the new installation (for a client), I haven’ touched the config.phpin terms of array:
image
So this is the "factory setting to to speak. But should it really be like this?
From my understanding folders should be 775 and files 644?

 sudo chown -R www-data:www-data .
  sudo chmod -R 755 .
  sudo chmod -R 775 cache custom modules themes data upload
  sudo chmod 775 config_override.php 2>/dev/null

Right?
Or am I completely incorrect?

The reason I’m digging into this again is because the client’s CRM instance has a lot of “undefined” on popups and buttons in some places like Studio…

I found this thread about the same subject:

I ran the “chown 755” command in the Linux prompt and now all files / folders are on that permission.

It does seem to have solved the “Undefined” issue, but I’m not very happy with having these high level permissions in terms of security. :scream_cat:

I will test further to see that everything is working properly on this CRM instance…

Thanks in advance.

It seems that it is working properly as before all buttons said “Undefined”.

But from a security perspective - 755 - on everything feels quite silly and a bit Russian roulette…

Thoughts? :thinking:

Thanks again. :facepunch:

To write values like 755 into the config.php array, make sure you prefix them with a zero, so 0775. This is PHP’s notation for specifying octal numbers.

Those 1528 are decimal, if you run them through a decimal-to-octal conversion you will see more familiar chmod values.

1 Like

Thanks for the reply pgr. :+1:

So…
‘dir_mode’ => 0???
image
This one doesn’t make sense to me. That cannot be the correct value?

and
image

‘file_mode’ => 0755
?
Thanks a bunch!

Why do you think 2770 cannot be correct?

Never seen that value before.
I just checked it out with FileZilla though:
image
Seems legit :+1:

1.) Please do educate me why the group has all the permissions and why it is needed if possible so I understand it better.

2.) As I understand group permission its for all “Users” on the server that has access/ownership to a file/folder right?

3.) Mostly important on shared environments like when you use a hosting company and are sharing a “public” server with tons of other customers. (?).

4.) 2770 is for the files in the www directory/sub-directories, correct?

Thanks a bunch!