MODE parameter specified with UDEV rule does not work.

Solution Unverified - Updated -

Issue

  • Specifying the parameter "MODE=0600" for non-root user does not work.

  • For example : When group is set to root, then the permissions are getting set correctly. Else the permissions are taken as 660

    • Udev rule is configured as

      ENV{DM_VG_NAME}=="testvg", OWNER:="myuser", GROUP:="mygroup", MODE:="600"
      

    Result after reloading the udev rules with udevadm control --reload-rules ; start_udev

        ll /dev/dm-7 
        brw-rw---- 1 myuser mygroup 253, 7 Sep 19 10:31 /dev/dm-7
    
    • Same rule with the user as root

      ENV{DM_VG_NAME}=="testvg", OWNER:="myuser", GROUP:="root", MODE:="600"
      

      Reload the rule and check

      ll /dev/dm-7 
      brw------- 1 myuser root 253, 7 Sep 19 10:32 /dev/dm-7
      
    • Device details

      # dmsetup info -c
      testvg-lv1   253   7 L--w    1    1   0 LVM-HF1Ad7tXFUP2WSdGPulhH9EhCagNa8dibGs5BKbO8j8RgoGOajCv2cf3qForvbO9
      
      # pvs ; vgs ; lvs
        PV                   VG             Fmt  Attr PSize   PFree
        /dev/mapper/mpathnp1 testvg         lvm2 a--    1.01g 8.00m
      
        VG             #PV #LV #SN Attr   VSize   VFree
        testvg           1   1   0 wz--n-   1.01g 8.00m
      
        LV       VG             Attr       LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
        lv1      testvg         -wi-a----   1.00g
      

Environment

  • Red Hat Enterprise Linux 6.5
  • udev-147-2.51.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content