User data location Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Deleted User 7758

User data location

Post by Deleted User 7758 »

When using drive manager the option to move user data to another drive the only option is to move it for user dietpi.
I have created another non-root account for myself. Should I have just stuck with using dietpi or is there a way I can move the user data folder to a another partition?
Related can I/should I remove dietpi as a user if i continue to use my new account? Will this cause issues with groups?
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: User data location

Post by Joulinar »

Hi,

many thanks for your report. Are you talking about /mnt/dietpi_userdata?? Probably there is a misunderstanding. This is not a home directory of user dietpi. It's the global directory to store majority of dietpi application data. Moving this will be fine. There is no need to move single user directories or to delete user dietpi, which btw is not wise as some application relay on this user.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Deleted User 7758

Re: User data location

Post by Deleted User 7758 »

Thank you Joulinar, yes I was talking about /mnt/dietpi_userdata.
So, can /mnt/dietpi_userdata be moved to the same partition as rootfs and would you recommend that?
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: User data location

Post by Joulinar »

yes that should be possible
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: User data location

Post by Joulinar »

one thing that stepped into my mind. If you moved entire rootFS, your user data directory should be located on HDD already.

Usually this is the way to go to transfer entire rootFS to HDD/SSD

viewtopic.php?f=11&t=7313&p=22717#p22717
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Deleted User 7758

Re: User data location

Post by Deleted User 7758 »

Thanks again, I moved it to the same partition as rootfs via the drive manager.
No errors reported so I assume it has all gone well.
Deleted User 7758

Re: User data location

Post by Deleted User 7758 »

Updating this - I was thinking that I had, after a few attempts, managed a good base install of DietPi on my Odroid.
So I set about installing some of the services I want to run and received an error when trying to install Syncthing and I think it's related to the above move of my dietpi_userdata folder
*towards the end of the installation process just prior to being asked to reboot.

Code: Select all

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Configuring Syncthing: backup and sync server with web interface

11:30:59 WARNING: Failed to generate config and keys: mkdir /mnt/dietpi_userdata/syncthing: permission denied
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : redis-server
[  OK  ] DietPi-Services | dietpi_controlled : mariadb
[  OK  ] DietPi-Services | dietpi_controlled : php7.3-fpm
[  OK  ] DietPi-Services | dietpi_controlled : lighttpd
[  OK  ] DietPi-Services | dietpi_controlled : syncthing
[  OK  ] DietPi-Services | dietpi_controlled : netdata
[  OK  ] DietPi-Services | dietpi_controlled : cron
[  OK  ] DietPi-Survey | Purging survey data

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Installation completed
After rebooting, running > synching produces

Code: Select all

jon@Odroid:~$ syncthing
-bash: syncthing: command not found
Permissions for /mnt/dietpi_userdata

Code: Select all

jon@Odroid:/mnt$ ls -al
total 16
drwxr-xr-x  5 root root 4096 May 12 11:51 .
drwxr-xr-x 21 root root 4096 May 11 10:18 ..
drwxr-xr-x  2 root root 4096 May 11 11:26 data
drwxr-xr-x  9 root root 4096 May 11 22:53 dietpi_userdata
drwxr-xr-x  2 root root    0 May 12 11:54 odroid_data
Shouldn't /mnt/dietpi_userdata be owned by dietpi?
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: User data location

Post by Joulinar »

Yes the permissions are incorrect. I guess you copied the data manually, probably as you followed the YouTube tutorial you used to move rootFS.

This is how permissions should looks like

Code: Select all

root@DietPi3:/mnt# ls -la
total 24
drwxr-xr-x  6 root   root   4096 May 12 10:48 .
drwxr-xr-x 30 root   root   4096 May 12 02:31 ..
drwxrwxr-x  6 dietpi dietpi 4096 May 12 02:20 dietpi_userdata
drwxrwxr-x  2 dietpi dietpi 4096 Jan  7 23:35 ftp_client
drwxrwxr-x  2 dietpi dietpi 4096 Jan  7 23:35 nfs_client
drwxrwxr-x  2 dietpi dietpi 4096 Jan  7 23:35 samba
root@DietPi3:/mnt#
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Deleted User 7758

Re: User data location

Post by Deleted User 7758 »

OK,
I thought I had fixed my permissions problems but they persist.
I am still getting these errors when trying to install Syncthing

Code: Select all

─────────────────────────────────────────────────────
 Mode: Configuring Syncthing: backup and sync server with web interface

15:44:41 WARNING: Failed to generate config and keys: mkdir /mnt/dietpi_userdata/syncthing: permission denied
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
sed: can't read /mnt/dietpi_userdata/syncthing/config.xml: No such file or directory
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : redis-server
[  OK  ] DietPi-Services | dietpi_controlled : mariadb
[  OK  ] DietPi-Services | dietpi_controlled : php7.3-fpm
[  OK  ] DietPi-Services | dietpi_controlled : lighttpd
I would love some advice on how to rectify.

Here's permissions for the user data folder

Code: Select all

jon@Odroid:~$ ls -al /mnt/dietpi_userdata
total 36
drwxrwxr-x 9 jon    root     4096 May 11 22:53 .
drwxr-xr-x 5 root   root     4096 May 12 11:51 ..
drwxrwxr-x 2 dietpi dietpi   4096 May 11 15:12 downloads
drwxrwxr-x 2 dietpi dietpi   4096 May 11 15:12 Music
drwxrwxr-x 5 jon    mysql    4096 May 13 15:47 mysql
drwxrwxr-x 5 jon    www-data 4096 May 11 23:00 nextcloud_data
drwxrwxr-x 2 dietpi dietpi   4096 May 11 15:12 Pictures
drwxrwxr-x 2 dietpi dietpi   4096 May 11 22:53 syncthing_data
drwxrwxr-x 2 dietpi dietpi   4096 May 11 15:12 Video
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: User data location

Post by Joulinar »

I guess you would need to create directory syncthing manually with similar permissions as syncthing_data
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply