Cannot get hard drive temperature as non root user with hddtemp in hardy

Bug #228306 reported by pjfl
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
hddtemp (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

After upgrading a working IBM Thinkpad Z61m from 7.10 to 8.04 i can no longer get the hard disk drive temperature as a non root user

ls -l /dev/sda

brwxrwxrwx 1 root disk 8, 0 2008-05-08 14:26 /dev/sda

because I've obviously responded to the permission denied error in the appropriate way chmoding 777 - not

/usr/sbin/hddtemp -n /dev/sda

if I'm me and non root user

/dev/sda: Permission denied

oh really, not my understanding of 0777

45

if I've su'd to root first

i guess after "upgrading" to horribly hopeless I just don't known Unix any more

Revision history for this message
Richard Seguin (sectech) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

* Please verify that you didn't change any permissions in gusty to get hddtemp to work while not-root...

I have tried this on a gusty system and I still get a permission error...

Changed in hddtemp:
status: New → Incomplete
Revision history for this message
pjfl (onl1ne) wrote :

Cannot confirm that I had to fix gusty before the hddtemp worked but can confirm that the "upgrade" process broke it.

What exactly do you expect of me in order that you have as complete an explanation as I know how to give?

>> "* Please verify that you didn't change any permissions in gusty to get hddtemp to work while not-root..."

Verified then, to the best of my recollection

Revision history for this message
pjfl (onl1ne) wrote :

sudo chmod u+s /usr/sbin/hddtemp

Revision history for this message
Richard Seguin (sectech) wrote :

I know that the sticky bit can be set in order to use it as a non-root user, I just want to make sure that the intended default action is actually working properly...

Revision history for this message
Richard Seguin (sectech) wrote :

I think there is enough information to confirm that you cannot get the hard drive temp without being root. I haven't been able to verify yet if this is the proper functionality though. It seems that setting the +s flag will allow a non-root user to work around the issue

Changed in hddtemp:
status: Incomplete → Confirmed
Richard Seguin (sectech)
Changed in hddtemp:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
footer (footer) wrote :

I can confirm that upgrading to Kubuntu 9.04 broke hddtemp (only able to run as root). And I did NOT have the sticky bit set before the upgrade (but it was working fine before the upgrade):

footer@kubuntu64:/usr/sbin$ ll hdd*
-rwxr-xr-x 1 root root 31928 2008-11-06 08:56 hddtemp

Setting the sticky bit as suggested did fix the issue and I'm able to get hddtemp as a non-root user:

footer@kubuntu64:/usr/sbin$ sudo chmod u+s /usr/sbin/hddtemp
footer@kubuntu64:/usr/sbin$ ll hdd*
-rwsr-xr-x 1 root root 31928 2008-11-06 08:56 hddtemp
footer@kubuntu64:/usr/sbin$ hddtemp /dev/sda | cut -f3 -d:
 37°C

I don't really think setting the sticky bit is the solution but whatever works!

Revision history for this message
Andrew Somerville (andy16666) wrote :

I can confirm this in Ubuntu 9.04. Setting the sticky bit apparently doesn't solve the issue that the sensors applet cannot access the hard drive sensors, although it does allow the shell command to work.

Revision history for this message
Nick (nick222-yandex) wrote :

I can cofirm this in Xubuntu 13.04.

Revision history for this message
Nick (nick222-yandex) wrote :

confirm :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.