Red Hat Bugzilla – Bug 102974
Changing timezone breaks /etc/localtime perms so UTC time is displayed instead
Last modified: 2007-04-18 12:57:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Description of problem:
When travelling, I like to change my timezone to the local timezone.
The bug is that when you run redhat-config-date as root, it updates
/etc/localtime and changes the permissions to 600. Ordinary users can no longer
read the file so all dates are displayed in UTC (unless you are root). You have
to chmod /etc/localtime to 644 and then logout and back in again to get Clock,
'date', etc to display correctly.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Here is the process I use to do this and the resulting bug:
1. Using Clock 126.96.36.199 in my gnome panel, I right-click and go to "Adjust Date &
2. I'm prompted for the root password.
3. redhat-config-date starts and I select the new timezone. I am also using ntp,
so the "Enable NTP" box is checked.
4. Click Okay, and the ntp server is contacted and then redhat-config-date
exits. The Clock applet does not change to the local timezone.
5. Run the 'date' command and note that the date is displayed in UTC, not the
old or new timezone.
6. Logging out and back in again causes the Clock applet to display the time in UTC.
Actual Results: The date is displayed in UTC.
Expected Results: The date should have been displayed in the local timezone.
I'm confused. At first, you are talking about the file permissions on
/etc/localtime getting changed to 600. I am not able to reproduce this behavior
with redhat-config-date-1.5.15-2. For me, the ownership never changes from 644.
Resolving as 'worksforme'.
I am having the same problem with both redhat-config-date-1.5.15-1 and
redhat-config-date-1.5.15-2. Only for root the 'date' command returns the time
in PDT, regular users get the UTC version. The permissions on /etc/localtime are
I can confirm this bug. Changing /etc/localtime to 644 solves the problem.
System is fully updated to rawhide as of 10/29/2003.
The problem is that /etc/localtime is created by redhat-config-date
without changing permissions. If the umask is 022, no problem, but if
the umask is 077, /etc/localtime does not get read permissions.
When creating files, please do not rely on the umask. This time it was
luckily not a security problem, just a loss of functionality. Unless
the umask is 000, but nobody is that stupid.
(I can't reopen this bug since I'm not the submitter.)
I am re-opening this bug. I didn't think of the umask, but I'm not
making my umask be less secure just so I can change the date when I
travel. I have learned to just chmod /etc/localtime as root when I
get to a new timezone, but it would be a lot better for
redhat-config-date to set the permissions explicitly.
The following code in timezoneBackend.py should force the umask on
/etc/localtime to be 644:
except OSError, (errno, msg):
print (_("Changing permission of timezone: %s") % (msg))
Please reopen this bug if you see this behavior with
system-config-date-1.7.2-1 in Rawhide.