Hi,
Thunar mounts my external disk correctly but it works for root and current user (the user who mounted the disk) while other users unable to read/write to the mounted disk.
How can I share mounted disk between users?
NOTE:
Thunar sets mount point to /media/[user]/[disk name] when I tried to change the owner of /media folder to 777 all users could see the mounted folder but can't read/wrte because Thunar sets the permissions to 644
How can I share mounted disk between users?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How can I share mounted disk between users?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 6
- Posts: 1491
- Joined: Fri Feb 22, 2013 5:18 pm
- Location: United States
Re: How can I share mounted disk between users?
WARNING: I don't have a clue, lol. But I just did some searching. It looks like Thunar uses other things to do the actual mounting. In the event that someone who has some intelligence/experience doesn't post a simple answer for you, maybe some of the information in these links will help:
Regards,
MDM
Code: Select all
http://superuser.com/questions/874171/mounting-usb-sticks-with-thunar-wrong-user-and-gruop
http://ubuntuforums.org/showthread.php?t=2273085
https://bbs.archlinux.org/viewtopic.php?id=194755
https://wiki.archlinux.org/index.php/Thunar
MDM
Mint 18 Xfce 4.12.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
Re: How can I share mounted disk between users?
Thanks a lot.MtnDewManiac wrote:WARNING: I don't have a clue, lol. But I just did some searching. It looks like Thunar uses other things to do the actual mounting. In the event that someone who has some intelligence/experience doesn't post a simple answer for you, maybe some of the information in these links will help:Regards,Code: Select all
http://superuser.com/questions/874171/mounting-usb-sticks-with-thunar-wrong-user-and-gruop http://ubuntuforums.org/showthread.php?t=2273085 https://bbs.archlinux.org/viewtopic.php?id=194755 https://wiki.archlinux.org/index.php/Thunar
MDM
Most of links above aren't relative to my issue except Thunar wiki page which maybe has a lead to the solution because it mention that Thunar uses gvfs so the user can customize mounting rules using ~/.gvfs/mounts. For that I wonder Am I on the right path or not? If yes; Is there any GUI solution for it (Thunar mounts the disks within single click / automatically which make life easier)?
Re: How can I share mounted disk between users?
Any external disk or a specific one?
You could specify explicit instructions in fstab so that when this device is attached it mounts to a specific place. How you specify that depends on how you formatted the device and you didn't specify. This is device specific though so you would have to add a line for each different device.
If you want to make it so any device attached is accessible by everyone then you could use bindfs. Play with this method for a while and see if it does what you want - it's easy enough to undo:
Install bindfs:
Create another mount point:
Then run this command to bindfs-mount /media to /mnt/ExtDisks with a different set of permissions:
To undo the mount:
What will happen is when you attach a USB disk it will mount in two different places simultaneously:
One in the normal place at /media/$USER/LABEL where the only user who will gain access is the user who attached the device ( i.e., $USER )
And again at /mnt/ExtDisks/$USER/LABEL where it will have permissions of 777 for folders and 666 for files.
Please note: Bindfs is a powerful thing but you need to keep in mind that using it with /media in this way will enable everyone to access anything under it.
Also note: This method makes your usb disk look a lot like an NTFS formatted device in that the permissions of 777/666 will be persistent throughout the disk. Not something you want to do if you are doing a system backup where you need to maintain the original permissions and ownership.
If it does what you want you can make the bindfs permanent with each boot by placing the line ( without sudo ) above the "exit 0" line in /etc/rc.local
You could specify explicit instructions in fstab so that when this device is attached it mounts to a specific place. How you specify that depends on how you formatted the device and you didn't specify. This is device specific though so you would have to add a line for each different device.
If you want to make it so any device attached is accessible by everyone then you could use bindfs. Play with this method for a while and see if it does what you want - it's easy enough to undo:
Install bindfs:
Code: Select all
sudo apt-get install bindfs
Code: Select all
sudo mkdir /mnt/ExtDisks
Code: Select all
sudo bindfs -o perms=0666:+X /media /mnt/ExtDisks
Code: Select all
sudo umount /mnt/ExtDisks
One in the normal place at /media/$USER/LABEL where the only user who will gain access is the user who attached the device ( i.e., $USER )
And again at /mnt/ExtDisks/$USER/LABEL where it will have permissions of 777 for folders and 666 for files.
Please note: Bindfs is a powerful thing but you need to keep in mind that using it with /media in this way will enable everyone to access anything under it.
Also note: This method makes your usb disk look a lot like an NTFS formatted device in that the permissions of 777/666 will be persistent throughout the disk. Not something you want to do if you are doing a system backup where you need to maintain the original permissions and ownership.
If it does what you want you can make the bindfs permanent with each boot by placing the line ( without sudo ) above the "exit 0" line in /etc/rc.local
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
-
- Level 6
- Posts: 1491
- Joined: Fri Feb 22, 2013 5:18 pm
- Location: United States
Re: How can I share mounted disk between users?
Sorry about that. I did warn you that I was clueless .mbnoimi wrote:Thanks a lot.
Most of links above aren't relative to my issue
IIRC, this issue has been discussed at the Xfce community web forum
Code: Select all
https://forum.xfce.org/
Arch's Wiki has all kinds of jewels in it, BtW. (Don't get me wrong, the Mint folks are real helpful, too.)
Regards,
MDM
Mint 18 Xfce 4.12.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.