tune2fs your USB NVMe drive was last mounted by user datapi.
It’s definitely part of your permissions problem because your Syncthing setup for user raspi4 is looking for
Anytime datapi takes ownership of the mount (
/media/datapi/NVME_usb) it’s not available for raspi4, and according to your output from
ls -l /media/raspi4/NVME_usb/, datapi doesn’t own
sync_folder1 or the other directories so it’s actually of limited used to datapi.
The inode counts look fine. Unless you’re planning on dropping 32 million more files and directories onto your drive it’s nothing to be concerned about.
That’s normal. Like with
touch, no output generally means no errors.
So the output from the command
ls /etc says that you do have a
(Be very careful whenever editing
/etc/fstab because it tells Linux which drives/partitions to use. Issues with the configuration file will cause boot errors.)
Although I think you should manually edit
/etc/fstab because it’d be a good learning experience, the following commands will back up your existing file and then append the mount parameters described earlier:
sudo cp -p /etc/fstab /etc/fstab.prev
sudo echo "LABEL=NVME_usb /mnt/NVME_usb ext4 defaults,noatime,nodev,nosuid,discard,uid=1000,gid=1000 0 0" >> /etc/fstab
(Review each command after copying and pasting before pressing the [Enter] key. If you make a mistake, do not reboot the RPi.)
If all goes well, neither command will generate any output.
Note that with the above mount configuration, the mount point
/mnt/NVME_usb will only be writable by users raspi and root unless the appropriate permissions are granted to other users on the system.
Reboot the RPi and verify that you can access
/mnt/NVME_usb while logged on as user raspi4. Also try creating and deleting some files.
If things checks out, then as user raspi4, run the following commands:
killall syncthing terminates any instances of Syncthing running under user raspi4.
rm /home/raspi4/.config/autostart/syncthing-start.desktop removes the Syncthing desktop shortcut from the autostart directory.
systemctl --user --now enable syncthing tells SystemD you want to enable then immediately launch Syncthing as user raspi4.
loginctl enable-linger raspi4 is optional. It tells the SystemD login manager that you want Syncthing to continue running even when you’re not logged on as raspi4 (very useful if you want your RPi to act as a server).
At any time while logged on as user
raspi4, the following commands will start, stop, or restart Syncthing:
systemctl --user start syncthing
systemctl --user stop syncthing
systemctl --user restart syncthing
Now if you set up OpenSSH and VNC, you can operate your RPi remotely without a keyboard, mouse and monitor.
A few more Linux pointers…
The Linux (Quick Study Computer) Pamphlet by BarCharts, Inc. was published back in March 2000, but it’s still a handy reference and well worth the $6.95. It’s a 8.5"x11" fan-fold laminated pamphlet crammed full of useful info.
A few websites: