DSBMD - a media mounting daemon/automounter for FreeBSD

abishai

Aspiring Daemon

Reaction score: 180
Messages: 753

I believe if you own fuse node or have write access to it, the command will succeed.
 

abishai

Aspiring Daemon

Reaction score: 180
Messages: 753

Probably, this is user responsibility. We can set nesessary rights in /etc/devfs.rules.
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

Probably, this is user responsibility. We can set nesessary rights in /etc/devfs.rules.
If you did so, /dev/fuse would be owned by this very user all the time. dsbmd just changes the ownership for a 10th of a second. As soon as the mount command returned, the ownership is restored.
 

abishai

Aspiring Daemon

Reaction score: 180
Messages: 753

dsbmd is not the only consumer of fuse, gvfs uses it too. Proper access to dev nodes is a part of setting up a workstation/server. We use devfs rules for our scanner (usb), for libinput, for nut and so on. Attempt to do all of this automagically is pandora box. IMHO.
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

dsbmd is not the only consumer of fuse, gvfs uses it too. Proper access to dev nodes is a part of setting up a workstation/server.
I agree, but where do you exactly see the problem with the current approach?
We use devfs rules for our scanner (usb), for libinput, for nut and so on. Attempt to do all of this automagically is pandora box. IMHO.
dsbmd of course restores the rights set in /etc/devfs.rules regarding /dev/fuse.
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

I've added a boolean chown_fuse variable which allows the user to control the discussed behavior via /usr/local/etc/dsbmd.conf. Setting chown_fuse = "no" leaves the permission issue to the user.
 

Minbari

Well-Known Member

Reaction score: 205
Messages: 389

After the last update the GUI version of sysutils/dsbmc doesn't set the window class, it's not floating and give the following message:
Code:
 QSystemTrayIcon::setVisible: No Icon set
and the error messages:
Code:
Fatal error: uconnect(/var/run/dsbmd.socket): Error: connect(/var/run/dsbmd.socket): Connection refused
I've restarted the daemon but it give the same error.

The terminal version sysutils/dsbmc-cli is not working either:
Code:
dsbmc-cli: Error: dsbmc_mount(/dev/ada0p1): Error: read_event(): Lost connection to DSBM
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

After the last update the GUI version of sysutils/dsbmc doesn't set the window class, it's not floating and give the following message:
Code:
 QSystemTrayIcon::setVisible: No Icon set
and the error messages:
Code:
Fatal error: uconnect(/var/run/dsbmd.socket): Error: connect(/var/run/dsbmd.socket): Connection refused
I've restarted the daemon but it give the same error.

The terminal version sysutils/dsbmc-cli is not working either:
Code:
dsbmc-cli: Error: dsbmc_mount(/dev/ada0p1): Error: read_event(): Lost connection to DSBM
Could you please post the last 100 lines of /var/log/dsbmd.log or run dsbmd in foreground via dsbmd -f and post the output?
 

Minbari

Well-Known Member

Reaction score: 205
Messages: 389


dsbmd -F
dsbmd: Command not found.


service dsbmd status
dsbmd is running as pid 8278.
 

Attachments

OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

For some reason dsbmd can't create a directory under /media due to a permission error. Did you set the immutable flag on /media?
Could please post the output of

ls -lo / | grep media and stat /media?
 

Minbari

Well-Known Member

Reaction score: 205
Messages: 389

For some reason dsbmd can't create a directory under /media due to a permission error. Did you set the immutable flag on /media?
Could please post the output of

ls -lo / | grep media and stat /media?
Code:
ls -lo / | grep media
drwxr-xr-x  3 root  512 Jan  9 09:35 media
and
Code:
stat /media                                                                                                                                                     
18446744072887533316 1 drwxr-xr-x 3 root wheel 0 512 "Jan  9 09:35:56 2020" "Jan  9 09:35:56 2020" "Jan  9 09:35:56 2020" "Jan  9 09:35:56 2020" 4096 1 0 /media
I did not mess with the writing/reading permissions of that directory, just update the port on 2 jan and the following day I see that dsbmc window can't float like always do when i3 starts and it was stop working properly.
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

I did not mess with the writing/reading permissions of that directory, just update the port on 2 jan
That's odd. The changes in 1.10 can't explain the problem you have. Is there some other filesystem mounted on /media ( mount | grep /media)? can you create a directory (as root) under /media?

I see that dsbmc window can't float like always do when i3 starts and it was stop working properly.
DSBMC was rewritten using Qt5, and there is no way to set the WM_CLASS via the API, afaik. I will add a workaround to support float.
 

Minbari

Well-Known Member

Reaction score: 205
Messages: 389

It does not permit me to create a directory in /media. The only filesystem mounted on /media it's the efi partition but that was also mounted before.
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

It does not permit me to create a directory in /media. The only filesystem mounted on /media it's the efi partition but that was also mounted before.
Could please post the output of mount | grep /media? And just to make sure:
unmount all filesystems mounted on subdirectories under /media, and finally:
Code:
# umount /media
# chflags noschg /media
Then try to again to create a directory under /media. If it works, dsbmd can do its job again.
 

Minbari

Well-Known Member

Reaction score: 205
Messages: 389

The output of mount | grep /media does not show anything but after I change flags it lets me can create directories in /media.

Problem solved sysutils/dsbmc and sysutils/dsbmc-cli are working now. The only problem for dsbmc it's WM_CLASS implementation for qt5, but I can live with the window without floating or I just use dsbmc-cli. Thank you for help.:beer:
 
OP
OP
mrclksr

mrclksr

Active Member

Reaction score: 129
Messages: 158

The only problem for dsbmc it's WM_CLASS implementation for qt5, but I can live with the window without floating or I just use dsbmc-cli.
If you start dsbmc as dsbmc -- "DSBMC", WM_CLASS will be set.
 
Top