comp.unix.programmer

Re: [GNU/Linux] reading FS' UUID from an unprivileged process?


Ivan Shmakov  writes:
>	How do I read the UUID of the filesystem covering a specific
>	directory from an unprivileged (non-root) process in GNU/Linux?

  It would help if you would state _why_ you want to do this.

  Neither of your proposed solutions is very good, since if the value isn't
  cached, you can't get to it.

  Option 1:

     A setgid (group ID = disk) helper process that can get the UUID for
     the device.

  Option 2:
     A root script that gathers and caches all UUID's at boot time (and via udev,
     when devices appear and disappear).  Your program can then access the cache.

scott



Written by scott_at_slp53.sl.home (Scott Lurndal) 04/10/2011 14.43.48
Check some pics on this site!
23/05/2012 22.33.20