Page 1 of 1

Qnap TS-212P user's folder

Posted: Wed Aug 14, 2019 6:25 am
by Salvini65
Hi, it's my first post so I introduce myself and then ask something :)
I have a TS-212P , bought two years ago and until now I never encountered problems.
I was updating to the latest firmware version, but a message error notified me there wasn't enough space left to download the file.
I used ssh to connect the nas and find something that could be erased to free up some space, but I saw in the /mnt/HDA_ROOT/.config/.qos_config/users a lot of folders with usernames that I've never created.
I'd like to know how the folders are created inside that path:
Every time you login with a new user the folder is created?

Re: Qnap TS-212P user's folder

Posted: Wed Aug 14, 2019 6:33 am
by Toxic17
the folder will be full of usernames that have a QTS desktop profile. ie they have logged into the webgui of the NAS.

the profile is basically a file with the users own personal settings (layouts etc) of the webgui.

Re: Qnap TS-212P user's folder

Posted: Wed Aug 14, 2019 7:24 am
by Salvini65
Ok so if I found a lot of usernames that I've never created I must assume someone found a way to enter the nas.

Sent from my Pixel 2 using Tapatalk


Re: Qnap TS-212P user's folder

Posted: Fri Aug 16, 2019 6:55 pm
by lexvo
Check in the admin web interface if these users exist. If so, delete them. Also change your admin password if you didn't create those users yourself.

Re: Qnap TS-212P user's folder

Posted: Wed Aug 21, 2019 7:46 am
by Salvini65
Sorry for my late reply, I was pretty busy this days.
I changed the admin password and controlled for new users: they weren't listed in the admin panel, so then I manually deleted the folders.
I'm still asking what could be happened because I'm sure the admin password couldn't be guessed and not even the other user's ones.. Even in the log I did not found any traces.

Sent from my Pixel 2 using Tapatalk


Re: Qnap TS-212P user's folder

Posted: Sat Aug 24, 2019 7:33 pm
by Salvini65
I created a simple script to notify me the creation of a new user's folder:

Code: Select all

#!/bin/sh
#########
# USER'S FOLDER CHECK
#########
while inotifywait -e create /mnt/HDA_ROOT/.config/.qos_config/users; do
        touch email.txt
        echo To: yourmail@something.com > email.txt
        echo From: smtpmail@somethingelse.com >> email.txt
        echo Subject: New folder has been created>> email.txt
        echo "=============== Folders list ===============" >> email.txt
        ls -al /mnt/HDA_ROOT/.config/.qos_config/users >> email.txt
        cat email.txt | sendmail -t
        sleep 10
        rm email.txt
done
I saved it into /etc/config, enabled the autostart.sh execution @ startup (Starting from QTS 4.3.3 it's required to enable the autorun.sh processing in the Control Panel->Hardware->General:Run user defined startup processes (autorun.sh)), mounted the config ramblock and created the autostart.sh script that recall the previous written code.

The ramblock mounting is different for each NAS model, you can find all the info here.

Of course you have to set smtp server from Control Panel -> System -> Notification.
If you're having trouble with Gmail smtp server, set the smtp server to Custom, enable 2FA from Google Account Control Panel and create an app password, then use it in the qnap smtp server configuration. This worked for me.

Hope this will be usefull to someone.