bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange date


From: Bruno
Subject: Re: strange date
Date: 18 Sep 2007 20:35:40 -0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Ok. Everything was working perfectly until I adjusted the time in the
KDE environment icon (it was a few minutes wrong). I did not change
any environment variable, or file permissions. Maybe the program
changed the permissions, but then is another type of problem (maybe
stranger :o).

I was also expecting an eol in the /etc/timezone, and now I added it
manually. 

The commands you asked:

> address@hidden ~]$ ls -ld /etc/localtime
> -rw-r----- 1 root root 1983 Aug 23 11:22 /etc/localtime
> address@hidden ~]$ ls -ldL /etc/localtime
> -rw-r----- 1 root root 1983 Aug 23 11:22 /etc/localtime
> address@hidden ~]$ LC_ALL=C strace -e trace=file date -R
> execve("/bin/date", ["date", "-R"], [/* 54 vars */]) = 0
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/lib/librt.so.1", O_RDONLY)       = 3
> open("/lib/libc.so.6", O_RDONLY)        = 3
> open("/lib/libpthread.so.0", O_RDONLY)  = 3
> open("/etc/localtime", O_RDONLY)        = -1 EACCES (Permission denied)
> open("/etc/localtime", O_RDONLY)        = -1 EACCES (Permission denied)
> open("/etc/localtime", O_RDONLY)        = -1 EACCES (Permission denied)
> Tue, 18 Sep 2007 23:22:43 +0000
> address@hidden ~]$
> address@hidden ~]$ ls -ld /etc/localtime
> -rw-r----- 1 root root 1983 Aug 23 11:22 /etc/localtime
> address@hidden ~]$ ls -ldL /etc/localtime
> -rw-r----- 1 root root 1983 Aug 23 11:22 /etc/localtime
> address@hidden ~]$            

Bruno


address@hidden (Bob Proulx) writes:

> Bruno wrote:
> > Did not work. I tried the commands (echo $TZ, env -i date -R) as
> > regular user and then as root. Bellow, the results (">" precedes all
> > comands just to show the prompt lines.
> 
> When things behave differently between root and non-root and the
> environment is the same then I would suspect permission issues.
> Probably root can read a file that has restrictive permissions for the
> non-root user.
> 
> > > address@hidden ~]$ env -i date -R
> > > Tue, 18 Sep 2007 22:19:27 +0000
> 
> Note the non-root user is UTC.
> 
> > > address@hidden ~]# env -i date -R
> > > Tue, 18 Sep 2007 19:20:01 -0300
> 
> The root user is -0300.
> 
> > > address@hidden ~]# cat /etc/timezone
> > > America/address@hidden ~]#
> 
> I expected to see a newline on the end of that file.
> 
> Try these things.  I suspect that the non-root user is not able to
> read the timezone file or perhaps the localtime file.
> 
>   LC_ALL=C strace -e trace=file date -R
> 
> Also what are the permissions on the /etc/localtime file?
> 
>   ls -ld /etc/localtime
> 
>   ls -ldL /etc/localtime
> 
> Bob
> 


-- 
-----------------------------------------
    Bruno Muller Junior em 18/09/2007





reply via email to

[Prev in Thread] Current Thread [Next in Thread]