mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1950] Chrome cannot get the timezone correctly breaking many websites #1306
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1306
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nitrocode on GitHub (May 20, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1950
My firejail command
If I open up DevTools and run
This returns
In order to set the timezone correctly so it does not break websites, I found this workaround.
Firefox doesn't seem to have this issue and I'm currently running firejail version 0.9.55
@SkewedZeppelin commented on GitHub (May 20, 2018):
What distro are you running?
Is the output of
ls -lha /etc/localtimeyour correct timezone?@nitrocode commented on GitHub (May 20, 2018):
@SkewedZeppelin running Ubuntu 16.04 Xenial.
My timezone is set correctly
@SkewedZeppelin commented on GitHub (May 21, 2018):
Can you try commenting
apparmorandnodbusin/etc/firejail/chromium-common.profile?@chiraag-nataraj commented on GitHub (Oct 3, 2018):
@nitrocode Is this still an issue?
@nitrocode commented on GitHub (Oct 3, 2018):
I haven't checked in a while but I'll check again by the end of the week.
@tofurky commented on GitHub (Jan 20, 2019):
Seeing the same thing when using private-etc in google-chrome.local using 0.9.56-1~0ubuntu18.10.0.
For some reason, specifying
private-etc ...,localtime,...causes /etc/localtime to point at the wrong file (seen by joining chrome's namespace):However, my actual filesystem has this:
I poked around but I'm kind of stumped. Running with --debug shows:
The only reference I saw to localtime was here:
97eed29370/src/firejail/fs_whitelist.c (L601-L615)As a workaround for the time being, removing localtime from private-etc and adding
env TZ=America/New_Yorkto google-chrome.local seems to fix it.@tofurky commented on GitHub (Jan 20, 2019):
Seems that it might have to do with fcopy resolving the final file, rather than the intermediate symlink:
If
copy_link()is the function in question, I guessreadlink()could be used there instead ofrealpath(), but that would be a major change in behavior:012dd9faeb/src/fcopy/main.c (L117-L134)@chiraag-nataraj commented on GitHub (May 21, 2019):
Is this still an issue?
@tofurky commented on GitHub (May 22, 2019):
yes, and will continue to be until
copy_link()includes all intermediate symlinks.@chiraag-nataraj commented on GitHub (May 22, 2019):
The thing is that this doesn't seem to affect Firefox's ability to get the system time right (or any other program's, for that matter)...that's why this is so odd.
@tofurky commented on GitHub (May 22, 2019):
it might have to do with chrome's extra sandboxing, not sure.
@chiraag-nataraj commented on GitHub (May 22, 2019):
Does this profile work for you? I don't get the error you're getting.
~/.config/firejail/chromium.profile~/.config/firejail/common.incI don't have
google-chromeinstalled, but I can try that to see ifchromiumversusgoogle-chromemakes a difference.@tofurky commented on GitHub (May 22, 2019):
you can see what timezone the browser is using @ https://browserspy.dk/date.php
@chiraag-nataraj commented on GitHub (May 22, 2019):
So it thinks I'm in GMT (come to think of it, I got the same result when I used the Date object in the Dev console...). I guess I never noticed this because I enabled fingerprinting resistance in Firefox, which also spoofs the timezone to GMT 😜
@Vincent43 commented on GitHub (May 22, 2019):
@tofurky why
/usr/share/zoneinfo/America/New_Yorkis a symlink toposixruleson your system?@chiraag-nataraj commented on GitHub (May 22, 2019):
It is on mine as well @Vincent43. From exploring a bit, it seems that (I think) the chosen timezone file is symlinked to posixrules for some reason...
@Vincent43 commented on GitHub (May 22, 2019):
Interesting. On Arch Linux I don't have such symlink.
@chiraag-nataraj commented on GitHub (May 22, 2019):
Hmm, I see.
@tofurky commented on GitHub (May 24, 2019):
it's the standard way of doing it on debian/ubuntu, at least.
@dw-loewe commented on GitHub (Mar 28, 2023):
had the same problem with firefox-esr (debian 11; firejail version 0.9.72) with private-etc enabled in firefox.local and firefox-common.local; circumvent that with
env TZ=<timezone>as mentioned by @tofurky