Hello,
This is the ext4 drive:
And this command should mount the device read-only:
However, when I access the /mnt folder with a regular user, I get this error:
I can list the contents of the folder with root permissions, though:
Here are my configurations:
/etc/sysctl.conf:
/etc/devfs.conf
/etc/devfs.rules
/etc/rc.conf:
Any idea what could be preventing the regular user from accessing the /mnt folder after mounting?
This is the ext4 drive:
Code:
Geom name: da0
Providers:
1. Name: da0
Mediasize: 4037017600 (3.8G)
Sectorsize: 512
Mode: r1w0e0
descr: Generic Flash Disk
lunname: ALCOR ALCOR
lunid: 200049454505080f
ident: A74100B4
rotationrate: unknown
fwsectors: 63
fwheads: 255
And this command should mount the device read-only:
Code:
$ mount -r -t ext2fs /dev/da0p1 /mnt
However, when I access the /mnt folder with a regular user, I get this error:
Code:
$ cd /mnt
cd: /mnt: Permission denied
I can list the contents of the folder with root permissions, though:
Code:
doas ls -l /mnt
total 76
drwx------ 5 1000 1000 4096 Jan 18 2024 file1
-rw-r--r-- 1 1000 1000 368 Jan 18 2024 file2
-rw-r--r-- 1 1000 1000 8260 Aug 21 2023 file3
Here are my configurations:
/etc/sysctl.conf:
Code:
# Allow regular users to mount
vfs.usermount=1
/etc/devfs.conf
Code:
own da0 root:operator
perm da0 0660
/etc/devfs.rules
Code:
[system=10]
add path 'usb/*' mode 0660 group operator
add path 'da*' mode 0660 group operator
/etc/rc.conf:
Code:
devfs_system_ruleset="system"
Any idea what could be preventing the regular user from accessing the /mnt folder after mounting?