How to modify mastodon files
-
Hello,
I need to modify files in the mastodon instance. Need to change mastodon logo, edit css etc. I read somewhere that cloudron doesn't allow any changes to these files? Is that true?@aksaks said in How to modify mastodon files:
Is that true?
Yeah. App code is read-only which makes updates, backups, restores, migrations etc of apps Just Work, and prevents hackers (or just users) breaking things.
-
Hello @aksaks and welcome to the Cloudron Community
Yes Cloudron does limit what you can edit for every app.
We do this for security reasons => https://docs.cloudron.io/security/#app-isolation-and-sandboxing and to allow a smooth update experience.Each app has its dedicated documentation for common tasks => https://docs.cloudron.io/packages/mastodon/
-
Hello @aksaks and welcome to the Cloudron Community
Yes Cloudron does limit what you can edit for every app.
We do this for security reasons => https://docs.cloudron.io/security/#app-isolation-and-sandboxing and to allow a smooth update experience.Each app has its dedicated documentation for common tasks => https://docs.cloudron.io/packages/mastodon/
-
@james said in How to modify mastodon files:
Yes Cloudron does limit what you can edit for every app.
Ok, I didn't know that. I do get security thingy etc but if we can't modify files then how else we are going to work with read only apps?
Hello @aksaks
From the documentation:
Apps are run with an AppArmor profile that disables many system calls and restricts access to proc and sys filesystems.
Apps run with a read-only rootfs preventing attacks where the application code can be tampered with.
@aksaks said in How to modify mastodon files:
if we can't modify files then how else we are going to work with read only apps?
The core application is read-only. Everything that is needed to be read-write e.g. files in Nextcloud, pictures in Mastodon, everything that is user-data is read-write.
This also greatly reduced the backup footprint, backup times and restore times.
Also, a tamper protection.
As an example, most WordPress instances get hijacked at some point and then the WordPress core PHP files are edited to insert malware or worse.
The application-core read-only approach protects from that. -
Sorry to jump in; just a few weeks ago I was successful in modifying the max_chars variable by enabling recovery mode and then modifying the relevant file in the web terminal. or so i think - i might be misremembering what i did, though at the time i didn't think much of it.
now, when i try to do the same thing again to up my character limit a bit more... any changes i make seem to revert. even after putting it in recovery mode and making changes, surprisingly.
has there been a change in the last few weeks to patch things to make it more resilient against user modifications like this? or am i possibly misremembering the process i went through?
-
Sorry to jump in; just a few weeks ago I was successful in modifying the max_chars variable by enabling recovery mode and then modifying the relevant file in the web terminal. or so i think - i might be misremembering what i did, though at the time i didn't think much of it.
now, when i try to do the same thing again to up my character limit a bit more... any changes i make seem to revert. even after putting it in recovery mode and making changes, surprisingly.
has there been a change in the last few weeks to patch things to make it more resilient against user modifications like this? or am i possibly misremembering the process i went through?
Hello @alialkhatib
@alialkhatib said in How to modify mastodon files:
any changes i make seem to revert
Yes, please read the answer I have written and what is linked in the documentation.
@alialkhatib said in How to modify mastodon files:
has there been a change in the last few weeks to patch things to make it more resilient against user modifications like this?
It has always been the case that the core application is read-only.
Yes you can edit the core application in recovery mode, but as soon as you restart the app or disable the recovery mode these changes are gone.