Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udevil changes permissions of mounted filesystem's root #75

Open
amckinlay opened this issue Jan 7, 2017 · 2 comments
Open

udevil changes permissions of mounted filesystem's root #75

amckinlay opened this issue Jan 7, 2017 · 2 comments

Comments

@amckinlay
Copy link

amckinlay commented Jan 7, 2017

Filesystem

[alarm@alarmpi ~]$ lsblk --output NAME,FSTYPE /dev/sda1
NAME FSTYPE
sda1 ext4

Mount with mount

[alarm@alarmpi ~]$ sudo mkdir /mnt/usb
[alarm@alarmpi ~]$ chacl -l /mnt/usb
/mnt/usb [u::rwx,g::r-x,o::r-x]
[alarm@alarmpi ~]$ sudo mount /dev/sda1 /mnt/usb
[alarm@alarmpi ~]$ chacl -l /mnt/usb
/mnt/usb [u::rwx,g::rwx,o::rwx]
[alarm@alarmpi ~]$ sudo umount /dev/sda1
[alarm@alarmpi ~]$ chacl -l /mnt/usb
/mnt/usb [u::rwx,g::r-x,o::r-x]
[alarm@alarmpi ~]$ sudo rm -r /mnt/usb

Mount with udevil

[alarm@alarmpi ~]$ udevil mount /dev/sda1
Mounted /dev/sda1 at /mnt/sda1-usb-Kingston_DataTra
[alarm@alarmpi ~]$ chacl -l /mnt/sda1-usb-Kingston_DataTra/
/mnt/sda1-usb-Kingston_DataTra/ [u::rwx,g::r-x,o::r-x]
[alarm@alarmpi ~]$ udevil unmount /dev/sda1

Check permissions again with mount

[alarm@alarmpi ~]$ sudo mkdir /mnt/usb
[alarm@alarmpi ~]$ sudo mount /dev/sda1 /mnt/usb
[alarm@alarmpi ~]$ chacl -l /mnt/usb
/mnt/usb [u::rwx,g::r-x,o::r-x]

udevil permanently changes my USB drive's ext4 root permissions to [u::rwx,g::r-x,o::r-x] from [u::rwx,g::rwx,o::rwx].

@amckinlay
Copy link
Author

Actually I guess this is adjustable by the mount_point_mode family of settings in /etc/udevil/udevil.conf, but I don't think it should be udevil's job to change permissions of a partition's filesystem.

@buzden
Copy link

buzden commented Sep 17, 2018

I don't think it should be udevil's job to change permissions

Personally I don't see any bad thing in this ability. But the default configuration, I think, should be to not to change anything by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants