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
Add config option to bypass checkDataDirectoryPermissions #3245
Comments
I ran into this problem and googled for this, too. IMHO this is much more than common problem (affects people for years), sometimes it's not resolvable making NC(OC) not installable 'by design' - in my case: Docker for Windows (v. 10 pro + Hyper-V) - permissions error - like many other ntfs, nfs, etc issues. This proposal is a great idea - as a workaround I simply commented out only line #768 - but I would rather left chmod attempt and allow gently bypass failing result in checkDataDirectoryPermissions(), sth like this ( current line #980 ): if ($perms[2] !== '0') {
$strictly = \OC::$server->getSystemConfig()->getValue('datadirectory.strictly.permissions', true);
if (!$strictly) {
return $errors;
}
$errors[] = [
//..
} Only one place to change and as above - default behaviour not changed but can be simply modified when needed. |
Let me add my vote here as we face issues with installing Nextcloud on OpenShift (see tobru/nextcloud-openshift#4). It's nearly impossible to change mount settings on OpenShift and in my opinion it should work out of the box. So if the directory permission checking can be made optionally by changing the configuration in the configuration file, that would be really great. |
This would be a really amazing fix to implement- I run everything on a Windows server 2016 docker install, and this glitch stops everything. I've tried a few ways to change permissions on a volume, but it's definitely not possible. Especially since NextCloud is so storage intensive, I can't save it in the same Moby VM as docker is running in |
This would make the docker image usable on Docker for Windows (nextcloud/docker#70). |
Just in case anyone else is looking at this- a workaround is to make the volume within the MobyVM- it's still treated as a volume, so persists outside of containers, but because it's within the Linux filesystem there aren't the permissions issues. However, definitely not an ideal fix, since this forces all the containers + data to be on the same VHD. In my case (probably not uncommon), I'd like to put the container on my SSD and the data on my HDD, but right now everything must be stored on the hard drive. It also introduces issues resizing the VHD if too much data is stored there. |
Fixed in #7347 |
'checkdatadirectorypermissions' => false, |
Hi can u help me out? |
@tangobravo5656 , if you did not find the answer, here it is: 'check_data_directory_permissions' => false, Just found it myself after months with this issue on an Unraid server with shared drives! |
Thank you very much! |
For further context, the parameter details can be found in the official documentation: |
During install Nextcloud checks the data directory has permission 0770 and won't let the install proceed without that.
It seems it might be good to allow this check to be skipped, in the same way that the admin can go to "Additional settings" and turn off the check for common passwords. (But this check should be on by default as is the other check.)
Skipping this has to be configured in config.php and not the admin panel; as you can't finish the install if this check fails you can't get to the admin panel! So you must be able to turn it off in config.php.
To add a feature to skip this check, replace this line:
in function checkServer in https://github.com/nextcloud/server/blob/master/lib/private/legacy/util.php#L699 (currently line number 699 and 718) with:
This will run the check by default, but then the admin can add
to config.php to skip it.
Goggling "please change the permissions to 0770 so that the" shows this is a common problem, with some problems caused by people using external drives with a different file system - http://askubuntu.com/questions/380767/please-change-the-permissions-to-0770-so-that-the-directory Tho it is true some problems seem to be caused by things like bad FTP uploads and there you definitely want file permissions sorted out properly.
I personally ran into this problem as I was running Nextcloud in Vagrant for testing, and my Vagrant mount options meant I couldn't simply use chmod to fix the problem. So I took a deeper look at it.
EDIT: I originally suggested wthout dashes but this seems to have lead to confusion as with dashes is now the official way - added in dashes to try and avoid confusing others.
The text was updated successfully, but these errors were encountered: