For some reasons, when an XDG user directory (i.e., Desktop
, Downloads
, Templates
, Public
, Documents
, Music
, Pictures
, or Videos
) is empty, it turns into a symbolic link after some time. Below is an example when it happens to Downloads
.
toto@pc-toto:~$ ls -l
total 60K
drwxrwxr-x 3 toto toto 4.0K Aug 31 10:10 Desktop/
drwxr-xr-x 5 toto toto 4.0K Aug 11 13:52 Documents/
lrwxrwxrwx 1 toto toto 21 Aug 31 10:51 Downloads -> /home/toto/Downloads
drwxr-xr-x 7 toto toto 4.0K Aug 3 16:50 Music/
drwxr-xr-x 26 toto toto 4.0K Aug 3 16:53 Pictures/
drwx------ 11 toto toto 4.0K Aug 9 11:34 snap/
drwxr-xr-x 5 toto toto 4.0K Aug 3 16:55 Videos/
toto@pc-toto:~$
I can temporarily solve the problem by deleting and recreating the relevant directories:
toto@pc-toto:~$ rm Downloads
rm: remove symbolic link 'Downloads'? y
toto@pc-toto:~$ mkdir Downloads
toto@pc-toto:~$ ls -l
total 64K
drwxrwxr-x 3 toto toto 4.0K Aug 31 10:10 Desktop/
drwxr-xr-x 5 toto toto 4.0K Aug 11 13:52 Documents/
drwxr-xr-x 2 toto toto 4.0K Aug 31 10:51 Downloads/
drwxr-xr-x 7 toto toto 4.0K Aug 3 16:50 Music/
drwxr-xr-x 26 toto toto 4.0K Aug 3 16:53 Pictures/
drwx------ 11 toto toto 4.0K Aug 9 11:34 snap/
drwxr-xr-x 5 toto toto 4.0K Aug 3 16:55 Videos/
toto@pc-toto:~$
This started to happen a few days ago on Ubuntu 23.04. It has also been seen on Ubuntu 20.04: Home directories turned into symbolic links without telling me the reason.
The empty folders will turn into symbolic links in a matter of hours. I didn't find any reason for this.