You are not logged in.
Pages: 1
Hello,
I am desperately trying to automount my external drive in bspwm.
So I looked here which clearly stated:
To mount removable drives, do not call mount from udev rules. In case of FUSE filesystems, you will get Transport endpoint not connected errors. Instead use udisks that handles automount correctly.
So I looked here. From what I understood I had to create the file
/etc/polkit-1/rules.d/50-udisks.ruleswith the indicated code in it. Of course I installed udev and usisks.
Even after a reboot it didn't work so I found autofs, and configured it according to the wiki. And, even, after a
systemctl start autofsmy external drive wasn't mounted.
Of course after every procedure I disconnected it and reconnected it.
So what have I done wrong ? ![]()
Thank you in advance for any response ![]()
Offline
One easy way to get automounting feature is to install 'udiskie' or 'udevil' and there dependencies.
I advice that, if you use udisks, you install 'udisks2' because 'udisks' is the obsolete legacy version.
The file '50-udisks.rules' is only needed if you are not in an active user session; if you use systemd-logind this is useless.
udisks2 doesn't mount anything by itself, you need to use the manual command:
udisksctl mount ...
or a wrapper which uses udisks2.
I have developed a graphical udisks2 wrapper named 'udisksvm' in AUR, if you like it.
But 'udevil' or 'devmon' can be used without udisks.
There are also file managers which have the 'automouting' feature; you can search in this direction too.
Offline
I have a script which uses pmount for this (and other) tasks:
https://raw.githubusercontent.com/AladW … notify-mnt
Install the deps and start it through "inotify-mnt -my"
Be warned that the code sucks badly and I haven't tested it in some time.
Last edited by Alad (2015-04-29 15:36:42)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Thank you for having taken the time to answer me ![]()
So I decided to use udiskie, configured to use udisks2 and since I wish to use ranger. So the external drive is correctly mounted in /media. But, despite the fact it's file system is ext4, I haven't got any writing permissions
.
Thank you very much again ![]()
Offline
udisks2 normally mounts drives to /run/media/$USER ...did you create udev rules or similar?
If you just want to mount your drive, you can also do udisksctl mount -b /dev/sdXY btw... doesn't need wrappers of more or lesser worth.
Last edited by Alad (2015-04-29 16:36:31)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
So, I didn't create any udev rules, the media is in fact mounted under /run/media/$USER and even without any wrappers I also haven't got any writing permissions.
Thank you again ![]()
Offline
But, despite the fact it's file system is ext4, I haven't got any writing permissions
Can you precise how do you know that, please?
Offline
Because I performed a mkfs.ext4 on the device. Or if you're talking about the writing permissions it's because when I try to copy something as a normal user I'm unable to do it.
Thank you again ![]()
Offline
It's not clear from your preceding posts how exactly you mount the disk and where.
Also post the output of the 'mount' command after the disk has been mounted (you can grep only the disk line).
And the owner/permissions of the mount point directory.
Offline
Once the drive has been mounted(via udiskie, which is automatically launched when I login to my session), mount gives me the following output:
/dev/sdc1 on /run/media/$USER/.. type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)Concerning the permissions, I manually changed them:
chown -R $USER:$USER /run/media/$USER/.. just to be able to write something on the disk.
But I'm afraid that it'll only affect the permissions for the current disk, so isn't there something cleaner ?
Thank you again very much ![]()
Offline
When I mount an external disk with udisks2, I get:
$ mount|grep media
/dev/sdb3 on /run/media/berbae/linux type ext3 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)It's an ext3 formatted partition, but it's not different with ext4 file system. 'linux' is its label.
$ ls -l /run/media
total 0
drwxr-x---+ 3 root root 60 30 avril 17:01 berbae
$ ls -l /run/media/berbae/
total 4
drwxr-xr-x 4 root root 4096 18 févr. 2014 linux
$ ls -l /run/media/berbae/linux/
total 3596
drwxr-xr-x 3 berbae users 4096 25 juil. 2013 berbaeAs shown the 'linux' mount point directory is 'root:root' 755 permissions.
I created a working directory on the disk which is called 'berbae' with ownership 'berbae:users' 755 permissions.
I can write normally under this '/run/media/berbae/linux/berbae' directory.
Changing the ownership/permissions of the 'linux' mount point would have worked also.
And this is kept between mountings/unmountings of the disk.
You only need to do it once.
In fact, if there is a sub-directory of the mount point on the disk with correct ownership/permissions for the user, writing to this directory works even if the mount point is 'root:root' 755 permissions.
And if the mount point ownership/permissions are changed to '$USER:users' 755, this is kept on the disk ext3/4 partition.
There is no need to do it at each mounting.
Offline
Thanks ![]()
So if I understood well I approximatively did the right thing ? except that changing the mounting root directory would have been easier ?
Thank you very much again ![]()
Offline
Pages: 1