I'm here again. Trying to install Nextcloud with dietpi_userspace on another drive, throws me this error. To save time, I also send a bug report just in case: f489c9d1-7964-4348-b501-c2de9bd420e1
Log file contents:
In Local.php line 387:
Following symlinks is not allowed
maintenance:install [--database DATABASE] [--database-name DATABASE-NAME] [--database-host DATABASE-HOST] [--database-port DATABASE-PORT] [--database-user DATABASE-USER] [--database-pass [DATABASE-PASS]] [--database-table-prefix [DATABASE-TABLE-PREFIX]] [--database-table-space [DATABASE-TABLE-SPACE]] [--admin-user ADMIN-USER] [--admin-pass ADMIN-PASS] [--data-dir DATA-DIR]
@enolp
Thanks for the report ๐
We have a known issue with Nextcloud install in v6.17 (https://github.com/Fourdee/DietPi/pull/2186), fixed in our beta:
https://github.com/Fourdee/DietPi/blob/beta/BRANCH_SYSTEM.md
F2FS "should" support symlinks:
https://unix.stackexchange.com/questions/323155/does-f2fs-support-permissions-and-symlinks/323156
We'll look into it.
Ooops @Fourdee, I forgot to mention that I was using the beta branch. My apologizes
@enolp
I forgot to mention that I was using the beta branch.
DietPi version | v6.18.2 (Fourdee/beta)
You did mention it ๐ My error ๐
Also my error because I didn't read my own bug report, just fill the fields and clicked send xD
@MichaIng
PHP not being installed in dev branch.
๐ฏ๏ธ Works fine if manual install dietpi-software install 89 114
๐ฏ๏ธ https://github.com/Fourdee/DietPi/commit/feac1235caade36db2898fa7ee9cf6120033b8fc
aSOFTWARE_REQUIRES_PHP[$software_id]=1
missing from lots of software.
๐ฏ๏ธ C2:
root@DietPi:/mnt/ssd# ln -sf test /mnt/ssd/test2
root@DietPi:/mnt/ssd# ls -lha
total 28K
drwxr-xr-x 2 root root 4.0K Nov 4 13:07 .
drwxr-xr-x 8 root root 4.0K Nov 4 13:06 ..
-rw-r--r-- 1 root root 2 Nov 4 13:07 test
lrwxrwxrwx 1 root root 4 Nov 4 13:07 test2 -> test
Issue is OC/NC disabled support for symlinked data dir due to "security" concerns:
https://github.com/nextcloud/server/issues/1257#issuecomment-245314285
However, as DietPi controls, manages and installs to symlink only if userdata is located on external drive as per user requirements, and www-data
permissions correctly set on the NC/OC data dir, there is no security concern and we will re-enable this feature.
@enolp
Install fixed in Beta update:
dietpi-update
Then run the installation again for NC
@Fourdee
Jep I fixed the missing PHP in the open PR, recognized as well. Will compare solutions later and make it ready for merge.
The same is for desktops and xserver.
We marked PHP through webserver dependency, but with single loop the webserver ID could have already passed when being marked. My fix was to fake PHP dependency for current loop ID: https://github.com/Fourdee/DietPi/commit/ee2cc65f9f1b8b5a89ac7e7876a5f1888fc026dd
Anyway I planned a new dependency system, storing dependency IDs in a new single array, to have everything in a single system instead of some via own array, some via manual making etc.
And you need to revert the symlink fix. This is still possible. Manual changing Nextcloud files would lead to integrity check issues, breaking updates and manual updates would override the fix. I believe the symlink issue is due to missing PHP modules and/or manual disabling in webserver config. Will check later.
@MichaIng
And you need to revert the symlink fix.
Fails without it ๐
@Fourdee
Strange, symbolic links inside the data dir are not supported or let's say not followed. But symbolic links of the data directory itself or it's parents are definitely supported, as this is a common method to move it after install, part of my how-to on Nextcloud forum and so many users following and reporting back it's working, including my own tests not long ago. If it's not working anymore then this must be a very recent change and Nextcloud forum should be flooded with related issues, which is not. I will tested, there must be another issue.
Testing:
Okay, ncc maintenance:install throws an error, but if this is ignored, the instance works fine, uploading new files work and they are placed as expected etc. config.php is fully configured with /mnt/dietpi_userdata/nextcloud_dada with dietpi_userdata being a symlink.
What is missing, is the skeleton directory, so data dir will be empty then. But actually this is anyway how I like it more...
So we could revert to ignoring ncc maintenance:install error code. Not ideal though. I think I open a Nextcloud GitHub issue. Also the comment within the settings code and the 2016 commit/issue clearly states that it is about symlink INSIDE data dir pointing OUTSIDE of data dir. But this is not the case if data dir itself or even parent folder is a symlink. This is handled incorrectly.
โฌ: Issue opened: https://github.com/nextcloud/server/issues/12247
๐ฏ๏ธ This is no issue on Jessie (NC 13.0.7), so error due to recent changes.
@Fourdee
Reworked the workaround: https://github.com/Fourdee/DietPi/commit/c35b4bbbdf2dbc82942fceca03a2aebeef5beccd
Retesting:
Little fix: https://github.com/Fourdee/DietPi/commit/c45888d6c58935b38528448d465f54ab7930d96e
@MichaIng
Legend ๐ Thank you.
Most helpful comment
Also my error because I didn't read my own bug report, just fill the fields and clicked send xD