greggbjensen / helm-crushftp

Helm chart and docker image for CrushFTP server.
MIT License
7 stars 7 forks source link

/var/opt/CrushFTP10/users is not linked to persistent volume #24

Open Zegeri opened 1 year ago

Zegeri commented 1 year ago

I've noticed that the users were deleted when I restarted my kubernetes deployment. In the container

root@crushftp-7b6dc6cccd-m52br:/var/opt/CrushFTP10# ls -l
total 8688
-rw-r--r--  1 root root     870 Dec 30  2020 CrushFTP.command
-rw-r--r--  1 root root  256512 Dec 30  2020 CrushFTP.exe
-rw-r--r--  1 root root 4217470 Apr 20  2022 CrushFTP.jar
-rw-r--r--  1 root root   89678 Sep  8 06:43 CrushFTP.log
-rw-r--r--  1 root root  151552 Dec 31  2020 CrushFTP32.exe
drwxr-xr-x  2 root root      63 Apr 21  2022 OSX_scripts
lrwxrwxrwx  1 root root      24 Sep  8 06:35 SavedReports -> /mnt/config/SavedReports
drwxr-xr-x 16 root root    4096 Apr 21  2022 WebInterface
drwxr-xr-x  4 root root      28 Apr 21  2022 auth
lrwxrwxrwx  1 root root      18 Sep  8 06:35 backup -> /mnt/config/backup
-rwxr-xr-x  1 root root   18935 Apr 21  2022 crushftp_init.sh
-rw-r--r--  1 root root    1182 Apr 21  2022 install.txt
-rw-r--r--  1 root root     416 Mar 21  2022 install_readme_linux.txt
-rw-r--r--  1 root root    1669 Apr  5  2022 install_readme_macos.txt
-rw-r--r--  1 root root     865 Mar 21  2022 install_readme_windows.txt
-rw-r--r--  1 root root   12112 Apr 21  2022 license.txt
drwxr-xr-x  5 root root      62 Sep  8 06:40 logs
-rw-r--r--  1 root root 1346940 Apr 21  2022 mssql-jdbc-9.4.0.jre11.jar
-rw-r--r--  1 root root 1361110 Apr 21  2022 mssql-jdbc-9.4.0.jre16.jar
-rw-r--r--  1 root root 1334601 Apr 21  2022 mssql-jdbc-9.4.0.jre8.jar
drwxr-xr-x  3 root root    4096 Apr 21  2022 plugins
-rw-r--r--  1 root root     199 Apr 21  2022 redist.txt
-rw-r--r--  1 root root    7882 Apr 21  2022 release.txt
drwxr-xr-x 11 root root     200 Apr 21  2022 samples
lrwxrwxrwx  1 root root      20 Sep  8 06:35 settings -> /mnt/config/settings
lrwxrwxrwx  1 root root      19 Sep  8 06:35 statsDB -> /mnt/config/statsDB
lrwxrwxrwx  1 root root      19 Sep  8 06:35 syncsDB -> /mnt/config/syncsDB
-rw-r--r--  1 root root   12563 Apr 21  2022 thirdpartynotices.txt
drwxr-xr-x  1 root root      53 Sep  8 06:35 users
drwxr-xr-x  4 root root      50 Apr 21  2022 xa

As you can see, the folder users is not linked to /mnt/config/users. In fact, the link is created inside the folder users.

root@crushftp-7b6dc6cccd-m52br:/var/opt/CrushFTP10/users# ls -l
total 0
drwxr-xr-x 1 root root 47 Sep  8 06:36 MainUsers
drwxr-xr-x 3 root root 62 Sep  8 06:36 extra_vfs
lrwxrwxrwx 1 root root 17 Sep  8 06:35 users -> /mnt/config/users

I guess the folder /var/opt/CrushFTP10/users existed before the startup script ran, so perhaps the script could rm -r /var/opt/CrushFTP10/users before creating the link?

Zegeri commented 1 year ago

I'm using a workaround by modifying the helm chart. I'm adding a pod post-start command to delete and link the user's folder.