Using dolphin, when a user USER1 create a folder FOLDER1 on an usb stick labelled “SANDISK_64GB_X”, it is found in ‘/run/media/home/USER1/SANDISK_64GB_X/FOLDER1’
if you use the same usb stick on the same computer but as another user USER2, you find your files and folder in ‘/run/media/home/USER2/SANDISK_64GB_X/FOLDER1’ if there is no access restiction.
It seems that it is not the same when using symlinks.
Example :
user USER1 is presently logged.
Using dolphin it creates a folder named version1 and put some files and folders on an usb stick labelled “SANDISK_64GB_X”.
Now another user USER2 using the same usb stick creates a folder named version2 and put some files and folders in it.
Then USER2 create a new folder named CURRENT and make a soft link from folder version2 to folder CURRENT and named the symlink CUR_VER.
So the datas are in ‘/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER’
Now USER1 use the usb stick.
Due to current permissions, USER1 can read files and folders in folder version1 and in folder version2 but it cannot read data from CUR_VER
In dolphin the property “point to” of the link is set to “/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER”.
So user1 cannot access to “/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER” because this path does not exists.
I need to manually replace USER2 by “$(logname)” in the link property.
Is there a way to have symlink behaves like real path ?
What is the formatting of the drive?
exFAT or FAT should not have issues.
If you have ext3 / btrfs on the drive every file gets the permissions of the owner.
So your user 1 could be user 1000 group 1000
So only that one can access the files and directories.
If your user 2 eg. 1001 : 1001 wants to access a 1000:1000 you would need to set the file permission to 1000,1001: 1001:1001 or you add the user to a group and create all the files under that group.
In dolphin the property “point to” of the link is set to “/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER”.
So user1 cannot access to “/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER” because this path does not exists.
I need to manually replace USER2 by “$(logname)” in the link property.
Mount points for removable drives are created dynamically when such drive is detected (when you insert your USB stick). They are created by your desktop software for the user currently logged in on the console.
Symlink has static content that is fixed at the time symlink is created.
You show the name of symlink, not the content of it. The name is not a problem here.
Of course, this path does exist. But the target of this symlink does not.
How many times do we need to repeat - never describe what computer does, show the actual commands and their output. Show
ls -l /run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER
or (if you are logged in as user1)
ls -l /run/media/home/USER1/SANDISK_64GB_X/CURRENT/CUR_VER
As I can’t log as user2 I can’t find and open the files in ‘/run/media/home/USER2/SANDISK_64GB_X/CURRENT/CUR_VER’
What my question means is :
If the link was coded like this :’ /run/media/home/$(logname)/SANDISK_64GB_X/…’ it gives registered user the possibility to access the link.