New FTP user for unRAID

  1. Install ProFTPd by SirG
  2. Create folder where the FTP user should have FULL access to
  3. Go to USERS tab
  4. Click ADD USER
  5. Create username
  6. Create password
  7. In the DESCRIPTION field enterftpuser [PATH WITH LEADING SLASH]
    So for example:
    ftpuser /mnt/usr/myfolder
  8. Click ADD
  9. Go to SETTINGS tab
  10. Click ProFTPd
  11. At “Enable ProFTPd:” select YES (*)
  12. Click APPLY
  13. Service should be running. If not, start service
  14. DONE

(*) In case you already have the service running, click RESTART to activate the new user.

The server can now be accessed by SFTP and port 22.

unRAID Docker image corrupted solution

Warning: This method worked for me and I used this source for it. Proceed at your own risk. Also I need to note that I do not use Cache in any form.

The problem:
You have rebooted your unRAID server and your docker service is refusing to start. What you may see is the following:

and

Apr 2 02:25:30 Tower emhttpd: shcmd (264): /etc/rc.d/rc.docker start
Apr 2 02:25:30 Tower root: starting dockerd ...
Apr 2 02:25:36 Tower kernel: BTRFS error (device loop2): parent transid verify failed on 23757324288 wanted 2572174 found 2572201
Apr 2 02:25:36 Tower kernel: BTRFS error (device loop2): parent transid verify failed on 23757324288 wanted 2572174 found 2572201
Apr 2 02:25:46 Tower kernel: BTRFS error (device loop2): parent transid verify failed on 23729225728 wanted 2572162 found 2572190
Apr 2 02:25:46 Tower kernel: BTRFS error (device loop2): parent transid verify failed on 23729225728 wanted 2572162 found 2572190
Apr 2 02:25:46 Tower kernel: BTRFS: error (device loop2) in __btrfs_free_extent:6805: errno=-5 IO failure
Apr 2 02:25:46 Tower kernel: BTRFS info (device loop2): forced readonly
Apr 2 02:25:46 Tower kernel: BTRFS: error (device loop2) in btrfs_run_delayed_refs:2935: errno=-5 IO failure
Apr 2 02:25:46 Tower kernel: BTRFS warning (device loop2): btrfs_uuid_scan_kthread failed -30
Apr 2 02:25:51 Tower emhttpd: shcmd (266): umount /var/lib/docker
Apr 2 02:25:51 Tower root: umount: /var/lib/docker: target is busy.

This of course, made me extremely nervous. Luckily this only meant that my docker file got corrupted. It happened most likely while I was moving it while the docker service was still active. Yeah, it happens.

Solution:
It’s fairly simple, but it takes a little bit of time.

  1. Go to Settings -> Docker -> Enable Docker, and set to No, then click the Apply button (this disables Docker support)
  2. Go to the location of your docker image and rename the file to docker.img.bak – The file may be in
    /mnt/user/system/docker

    I’m asking you to make a backup, because in all cases, safety first. “Why didn’t you have a backup in the first place?”, I hear you say. Yeah yeah, we all make mistakes every so often! D:

  3. Go to Settings -> Docker -> Enable Docker, and set to Yes and this creates a fresh and empty Docker image. The docker service should now be started. You can see this as this on the docker settings page:

    and on the dashboard you should now see an empty docker field.

  4. Now go to the Apps Tab, Previous Apps Section. Then check off all of your previous applications and hit “Install”

I recommend to do it one by one so you can double-check the settings and clean up the unused templates after you’re done. If you want to make a copy of the templates, FTP into your server and go to

/boot/config/plugins/dockerMan

After you have restored your docker apps, you’re done. Check all the things and make a backup 😉

 

 

Downgrade unRAID 6.7.2 to 6.6.7

Due to CONTINUOUS database corruptions I was forced to downgrade my unRAID back to 6.6.7 to see if that fixes the corruption issue. It’s really terrible and apparently hard to fix because LimeTech has not fixed the issue yet, not is is acknowledged as an issue.

1. download the following file

https://s3.amazonaws.com/dnld.lime-technology.com/stable/unRAIDServer-6.6.7-x86_64.zip

2. Extract the files on your drive

3. Ditch all extracted files except these:

./bzfirmware  
./bzimage  
./bzmodules  
./bzroot  
./bzroot-gui

4. Start an FTP program like Filezilla and go to the /boot/ folder

5. MAKE A BACKUP OF THE FILES MENTIONED AT STEP 3

6. Remove the files from the server and upload the extracted files mentioned in step 3 onto the server.

7. Check the date of the files on the server and make sure it’s 777 and root:root

8. Restart the server and you’re back at 6.6.7

Good luck.

Force a file scan in NextCloud

To force a scan after a manual file transfer, for example, can be done as follows:

sudo -u [USER] php occ files:scan --all

for example:

sudo -u john php occ files:scan --all
Usage:
  files:scan [-p|--path="..."] [-q|--quiet] [-v|vv|vvv --verbose] [--all]
  [user_id1] ... [user_idN]

Arguments:
  user_id               will rescan all files of the given user(s)

Options:
  --path                limit rescan to the user/path given
  --all                 will rescan all files of all known users
  --quiet               suppress any output
  --verbose             files and directories being processed are shown
                        additionally during scanning
  --unscanned           scan only previously unscanned files

Source: https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html