Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Can root update firefox from command line?

  • 3 trả lời
  • 1 gặp vấn đề này
  • 42 lượt xem
  • Trả lời mới nhất được viết bởi tanstaafl-tanj

more options

I run debian 9.8, and rather than using the distro version of firefox, I run the mozilla version. This works just fine, but when firefox detects that it needs updating, the only way I know to do it is to log into Xwindows using the root account and do it from there. I don't want a *user* account to own the browser, but I can't seem to find a way to update without Xwindows. There are some old links about using .MAR files, but the most recent one is a couple of years old, and due to appearances, i suspect - although i didn't confirm it by following the links - that only older versions, not the current one, can be loaded that way. Enough people have looked at this that it would appear worth putting in a flat warning that this cannot be done, so that people don't waste their time looking for something that doesn't exist. Help!

I run debian 9.8, and rather than using the distro version of firefox, I run the mozilla version. This works just fine, but when firefox detects that it needs updating, the only way I know to do it is to log into Xwindows using the root account and do it from there. I don't want a *user* account to own the browser, but I can't seem to find a way to update without Xwindows. There are some old links about using .MAR files, but the most recent one is a couple of years old, and due to appearances, i suspect - although i didn't confirm it by following the links - that only older versions, not the current one, can be loaded that way. Enough people have looked at this that it would appear worth putting in a flat warning that this cannot be done, so that people don't waste their time looking for something that doesn't exist. Help!

Giải pháp được chọn

OK, the answer is *not* to try to get .MAR files to work, or to package up the firefox files into a .DEB file. I had forgotten that to install firefox in the first place, all I had to do was untar the package wherever I wanted ... so I did it again. It's probably a Good Idea to clean out the folder tree before re-installing, so I did that as well, and all is good, since user profile information is stored in folders in the user's home folder.

Thank U for putting up with me!

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (3)

more options

I assume that these instructions still work.

You need these three files in the updates/0 folder to update Firefox via a MAR file:

  • update.mar (renamed update partial/complete.mar)
  • update.status: pending + linefeed (0x0A) (use this data URI: data:text/plain,pending%0A)
  • update.version: xx.xx.xx (version to update to, e.g. 66.0.1)

Firefox creates the updated folder with the new version when the downloaded update is ready to be applied to prepare for updating on the next start.

more options

cor-el said

* [ snip ] * Firefox creates the updated folder with the new version when the downloaded update is ready to be applied to prepare for updating ON THE NEXT START.

Reading my initial post, I can see that I forgot to note that I don't want to log into X using root, because I prefer to do my maintenance from the command line; there are a *lot* more opportunities for a bad actor to subvert the system in X than there are without it. The command line is of course not inherently secure, it's just that it has a smaller attack surface than X.

The root account owns the firefox directory tree, so it needs to be the one running the updates; user accounts can read and execute files, but not change them or add any. Thus, if Firefox can only update itself using the GUI, then I guess I'll have to go that route for now (until I learn to package it up in a .DEB file, anyway).

Thus, I guess my question should have been: Is it possible to update Firefox without using the GUI?

BTW, thank U for the answer, cor-el!

more options

Giải pháp được chọn

OK, the answer is *not* to try to get .MAR files to work, or to package up the firefox files into a .DEB file. I had forgotten that to install firefox in the first place, all I had to do was untar the package wherever I wanted ... so I did it again. It's probably a Good Idea to clean out the folder tree before re-installing, so I did that as well, and all is good, since user profile information is stored in folders in the user's home folder.

Thank U for putting up with me!