Forum

Thread tagged as: Configuration, Suggestions, Discussion

Explicit Perch Directory Access Permissions

Hi there, I'm looking for a canonical list of all the directories that Perch writes and needs to execute. As it stands, there is only one place that I could find that lists the folders which require write access and it was https://docs.grabaperch.com/perch/getting-started/installing/ in the section where it mentions 'Final Steps' and even here it only mentions 'perch/resources'.

I need this information as our client uses SELinux which requires mandatory access control to be set up with every application, and we must explicitly state which folders Perch will write to, so until we know exactly what folders Perch may write to, we cannot guarantee that the application will not flip out when something is modified.

The directories that I have come up with so far that seem to require write access are as follows: perch/resources perch/addons/apps/perch_blog/lang/ perch/core/lang/

I believe there is logic to do with how the templates work, in terms of them getting copied to new locations and thing, but I am not sure on this, and there may be something to do with the backups that Perch makes as well.

This is incredibly important as this can make or break whether we use Perch.

In general, when a company creates a piece of software they should list all folders that require write access, not 1 out of many, this seems a bit naive.

If Perch aren't willing to do this themselves, I urge anyone with more information to contribute to this post so we can come up with a canonical list for other users to use who may be experiencing issues with setting up Perch on SELinux hardened Linux machines.

Conner McCabe

Conner McCabe 0 points

  • 3 years ago
Duncan Revell

Duncan Revell 78 points
Registered Developer

Hi Connor,

I'll confess to not actually checking this, but doesn't the original setup steps list which folders should be writable? As far as I'm aware it's just the config and resources folders.

Perch doesn't automatically move templates around - the developer does that and Perch doesn't make backups, so there is no need to define a folder to write to for that either.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It should only be perch/resources that is required.

None of the lang directories need to be writable. Perch will write to them if it can, but not if it can't.

During setup, Perch writes to the config folder, but you wouldn't do that step on a live server.

Hi guys, thanks for the responses.

Duncan Revell said:

Hi Connor,

I'll confess to not actually checking this, but doesn't the original setup steps list which folders should be writable? As far as I'm aware it's just the config and resources folders.

Perch doesn't automatically move templates around - the developer does that and Perch doesn't make backups, so there is no need to define a folder to write to for that either.

Hi Duncan, yes I posted a link to the installation page, this is where I was looking originally, but Perch makes modifications elsewhere in the filesystem, if you run any version control systems under your site, you'll understand what I'm talking about :)

Drew McLellan said:

It should only be perch/resources that is required.

None of the lang directories need to be writable. Perch will write to them if it can, but not if it can't.

During setup, Perch writes to the config folder, but you wouldn't do that step on a live server.

Okay Drew, thanks for the info, was unaware the lang directories were not compulsory, I get a lot of modifications appearing on my git repository during operations and presumed these changes were necessary for Perch operation.

The config won't be an issue, no.

What are the modifications that Perch makes to the language file then? What is their purpose if they are not required?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What are the modifications that Perch makes to the language file then? What is their purpose if they are not required?

If a string in the UI doesn't appear in your lang file, Perch adds it to aid future translation. If you have Perch running in English then this won't be an issue.