-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle read only apps folders properly #28543
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add back the check for "config_is_read_only" as upgrading to 10.0.3 would likely cause surprises for people who have it set.
If we want to remove it then deprecate it in 10.0.3 and remove completely in 11.0. But I'm not sure if we should remove it as some people without cluster setup might want to have the config read-only, so they wouldn't think about setting cluster mode.
lib/private/Config.php
Outdated
@@ -272,5 +281,12 @@ private function writeData() { | |||
\OC_Util::clearOpcodeCache(); | |||
} | |||
} | |||
|
|||
public function isReadOnly() { | |||
if (!$this->getValue('installed', false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also include the config_is_read_only
key here ?
lib/private/Installer.php
Outdated
@@ -91,7 +91,11 @@ public static function installApp( $data = []) { | |||
|
|||
$info = self::checkAppsIntegrity($data, $extractDir, $path); | |||
$appId = OC_App::cleanAppId($info['id']); | |||
$basedir = OC_App::getInstallPath().'/'.$appId; | |||
$appsFolder = OC_App::getInstallPath(); | |||
if ($appsFolder === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you should also add is_writeable
and is_readable
here ? See https://github.com/owncloud/core/pull/28543/files#diff-ec8c121d705ff47eacbfdd23f36a9f6cL731.
<option value='<?php p($secure)?>' <?php p($selected) ?>><?php p($name) ?></option> | ||
<?php endforeach;?> | ||
</select> | ||
<?php p($l->t('The config file is read only. Please adopt your setup by editing the config file manually.')); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adopting a child ?
=> adjust
</select> | ||
<?php p($l->t('The config file is read only. Please adopt your setup by editing the config file manually.')); ?> | ||
<br> | ||
<?php p($l->t('In a clustered setup please make sure to sync the file across all nodes.')); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/the file/the config.php file/
to make sure this is clear
2490eec
to
7eb5dba
Compare
@PVince81 thanks for your feedback - I removed the config parameter 'cluster.mode' now totally. 'config_is_read_only' will do its job for now |
hmm, so does it mean that "config_read_only" will now also block the apps folder ? People who had this set will be surprised that they can't install new apps ? |
Thats my point about this all: it's a mess and needs cleanup .... this was the idea in having ONE config switch to rule them all ... 😉 |
@DeepDiver1975 do we want to surprise these people ? If yes, will need proper communication |
so you advocate for keeping two intendant checks
|
7eb5dba
to
1155cc4
Compare
If this was OC 11 I'd be fine with breaking the way it works. For OC 10 the easiest is just do nothing and maybe add a note about clustering in the documentation about the two settings to change:
Now if the above doesn't work correctly then we should fix that at least. |
30f9b82
to
d93b2c9
Compare
@PVince81 a much simpler solution now - only addressing if the apps folder is writable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 that's better, thanks.
Please rename issue title and merge if you tested this and all still worked fine
d93b2c9
to
fa75a5a
Compare
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This is planned to support clustered setup much better ....
Related Issue
refs https://github.com/owncloud/platform/issues/133
How Has This Been Tested?
Types of changes
Checklist: