Yunohost incompatible to dietpi-software installer

Having issues with your DietPi installation, or, found a bug? Post it here.
Allamur
Posts: 30
Joined: Mon Jun 26, 2017 2:58 pm

Yunohost incompatible to dietpi-software installer

Post by Allamur »

hey there,
today I've tried to install samba via the dietpi-software manager.
The installation worked fine and samba is working, but nextcloud isn't working anymore and says, that the config folder isn't writable.I don't understand why the installation of a not-web software messes with the permissions of the www-folder.

EDIT: I checked the permissions - they're ok - still 755 owner www-data

The reason why I'm posting here (I've opened a thread on the yunohost forums nevertheless) is that it's reproducible with the dietpi-software installer. It's not a specific yunohost problem!

How can I see what the dietpi-software installer is doing while installing the software?
I thought it would just apt-get update and so but it's doing way more than this...

crossreference to yunohost-forums:
https://forum.yunohost.org/t/www-folder ... -that/3932
Last edited by Allamur on Sat Dec 16, 2017 5:15 pm, edited 1 time in total.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Fourdee »

Hi,

We are releasing DietPi v159 in under 12 hours which has various fixes for the NextCloud/Owncloud installations.

I can only advise retesting the installation of NextCloud, once your system is updated to v159. If problems persist after the update, please let us know, so we can open investigations.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
WarHawk
Posts: 634
Joined: Thu Jul 20, 2017 8:55 am

Re: dietpi-software installer results in unusable nextcloud

Post by WarHawk »

I can tell you on my OPi-PC I made it bulletproof by going into "dietpi-config" going into "performance" and setting minimum to 240mhz, and maximum to 912mhz

Code: Select all

                             ┌─────────────┤ DietPi - Performance Options ├─────────────┐
                             │  Hardware : OrangePi PC (armv7l)                         │ 
                             │  ARM Temp: 42'c                                          │ 
                             │  RAM: 1024 MB | Used: 734 MB | Free: 290 MB              │ 
                             │                                                          │ 
                             │            Change CPU Governor  : ondemand               │ 
                             │            CPU Throttle Up      : 50%                    │ 
                             │            Ondemand Sample Rate : 25 ms                  │ 
                             │            Ondemand Down Factor : 80 (2000 ms)           │ 
                             │            CPU Max Freq Limit   : 912 MHz                │ 
                             │            CPU Min Freq Limit   : 240 MHz                │ 
                             │              <Ok>                  <Back>  
Sure I neuter it a little bit, but was able to run a 4 core stress test for over 15 min, starting temp was 42C, and after 15min while running stress and going thru my nextcloud syncing pics and uploading/downloading photos the temp got up to 58C...even though with slower processor speed, it will keep it from overheating, I also have a 1" chunk of heatsink jb quickweld epoxied to the top of the heatsink, so it helps slow down the processor saturation. As long as the OPi isn't using all 4 cores at max CPU for a crazy long time it will never throttle.
Allamur
Posts: 30
Joined: Mon Jun 26, 2017 2:58 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Allamur »

Ok I'll report back after updating the instance.
But I have to tell, that nextcloud wasn't installed via the dietpi software installer, it was installed via the script from yunohost.
but maybe there isn't much of a difference, it apt-get install all the stuff in a row, nothing really special.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Fourdee »

Allamur wrote:But I have to tell, that nextcloud wasn't installed via the dietpi software installer, it was installed via the script from yunohost.
Now it makes sense, apologies, must of missed that :)

The fixes I mentioned are only for dietpi-software optimized installations.

If you can link the script in question, i'll take a look and see if we can resolve our end.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Allamur
Posts: 30
Joined: Mon Jun 26, 2017 2:58 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Allamur »

I really don't want to overload you - First I have to analyze, what the problem actually is (it's probably better to get help for this in the yunohost forums.)
After that, it would be nice to have someone here to analyze what the root cause is.

Nevertheless - here the install script:
https://github.com/YunoHost/install_scr ... l_yunohost
Allamur
Posts: 30
Joined: Mon Jun 26, 2017 2:58 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Allamur »

Fourdee wrote:
Allamur wrote:But I have to tell, that nextcloud wasn't installed via the dietpi software installer, it was installed via the script from yunohost.
Now it makes sense, apologies, must of missed that :)

The fixes I mentioned are only for dietpi-software optimized installations.

If you can link the script in question, i'll take a look and see if we can resolve our end.
@Fourdee

Ok - I know the reason now!
An installation resets the permission and owner of everything inside of www
For instance - The nextcloud website is in the folder under www/nextcloud with the user "nextcloud" and 755 permission.
After an installation it resets to the user and group www-data and 775 - so the nextcloud user cannot write to this directory anymore.

Is it possible to disable this behavior? If I install a package via apt-get normally this doesn't happen - only if I use the dietpi-software installation method.

A simple chown -R user:user directory and chmod -R 755 directory brought my nextcloud and wallabag back to life.
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: dietpi-software installer results in unusable nextcloud

Post by MichaIng »

Hmm, usually all web services are run by webserver user, which is by default www-data. If you install Nextcloud via dietpi-software it will be configured that way, thus will not show issues.
Is there some special reason you use another user and how did you realize it with webserver? I could think of adding the possibility to DietPi Nextcloud/ownCloud, if there is a good reason and compatibility with other software.
User avatar
WarHawk
Posts: 634
Joined: Thu Jul 20, 2017 8:55 am

Re: dietpi-software installer results in unusable nextcloud

Post by WarHawk »

MichaIng wrote:Hmm, usually all web services are run by webserver user, which is by default www-data. If you install Nextcloud via dietpi-software it will be configured that way, thus will not show issues.
Is there some special reason you use another user and how did you realize it with webserver? I could think of adding the possibility to DietPi Nextcloud/ownCloud, if there is a good reason and compatibility with other software.
Could have been an apt-get install, it might be using a default user in the script rather than the dietpi script for install
Allamur
Posts: 30
Joined: Mon Jun 26, 2017 2:58 pm

Re: dietpi-software installer results in unusable nextcloud

Post by Allamur »

I don't know the exact reason why yunohost opts for a specific user for several apps (wallabag and nextcloud as far as I know) and I don't have a special reason for this. I just go for the default, which differs from the default in the dietpi-software installer.

And there's another problem to login to the yunohost adminpanel after an upgrade via the dietpi-software installer. But again, I've to check the yunohost forums first and come back what the specifics of the rootcause are.

What's yunohost:
https://yunohost.org/#/

Here's the install script of yunohost:
https://github.com/YunoHost-Apps/nextcl ... ts/install

Line 58:

Code: Select all

# Create a system account for Nextcloud
sudo useradd -c "$app system account" \
    -d /var/lib/$app --system --user-group $app \
|| ynh_die "Unable to create $app system account"
and it adds nextcloud as a user - I can think of having separate users for each software for security purposes.
Post Reply