Accessing HTML Files From / (root) location [Xubuntu]
I have some .htm files which are stored in the root / directory and I would like to know how to access them in Firefox, running on Xubuntu 22.04 LTS
Interestingly enough, I found a solution here: Firefox Quantum: HTML files from internal (/usr) do not open which did solve my issue on my Virtual Machine which is running the same Xubuntu 22.04, however since performing a clean installation on a physical machine the same solution has not worked and I just get the follow error as shown in my image.
Despite removing the snap version of Firefox and performing the installation shown in this guide: How to install Firefox deb package, my physical machine just cannot access my local .htm files.
This has never been an issue for me on RHEL environments, and the file path syntax I am using is: file:///my_dir/my_dir2/index.htm
The directory permissions are: drwxr-xr-x root root
Modified
All Replies (8)
Dropa said
So what O/S are is the actual O/S running there? Your thread says Windows but you refer to Xubuntu so which is which here installed from Actual to VM environment?
Hello @Dropa I'm not sure why my thread says Windows. Sorry about that, this is my first time posting on here. In any case yes I have Xubuntu 22.04 running in VirtualBox and I don't have issues viewing my .htm files after removing the snap version.
I also have a physical machine running Xubuntu 22.04 and despite removing the snap version and installing the deb package just like on my VM I cannot view my .htm files stored in root.
I hope this information helps.
Modified
I have never tried to open a file owned by root except as read-only in a text editor. I suggest you change the permissions or ownership of the files and, ideally, move the files to a better location.
Modified
Terry said
I have never tried to open a file owned by root except as read-only in a text editor. I suggest you change the permissions or ownership of the files and, ideally, move the files to a better location.
Hello Terry, thank you for your feedback. I agree putting things in root is not advised, unfortunately this is a legacy procedure of the customer and they are reluctant to change at the moment. I am just baffled how I managed to get it to work in my VM, but not their actual machine. I don't understand why Firefox on Xubuntu is having this issue, but on their CentOS machines it's perfectly fine with no modifications needed.
I understand that you're facing an issue with accessing .htm files stored in the root directory on Xubuntu. It seems you could view them on your Virtual Machine after removing the snap version of Firefox, but the same solution didn't work on your physical machine. To fix this, you may want to check the file permissions and ownership of the files. Opening files owned by root might be read-only. Try changing the permissions or ownership to allow access. While putting files in the root is not ideal, you can suggest moving them to a different location for better management. Hope this helps!
suram080 said
I understand that you're facing an issue with accessing .htm files stored in the root directory on Xubuntu. It seems you could view them on your Virtual Machine after removing the snap version of Firefox, but the same solution didn't work on your physical machine. To fix this, you may want to check the file permissions and ownership of the files. Opening files owned by root might be read-only. Try changing the permissions or ownership to allow access. While putting files in the root is not ideal, you can suggest moving them to a different location for better management. Hope this helps!
Hello suram080, thank you for your input. I have performed a sanity check between the physical machine and my VM. All permissions are identical along with the settings used within Firefox. Oddly enough I downloaded Firefox from the website and extracted the contents in my user home directory. Opening Firefox from here didn't have any issues accessing my files located in root. Very strange. Currently I have found that the epiphany browser does not have any issues accessing files from root, so it looks like I might have to move away from Firefox.
Modified
If you enter about:policies in the address bar, is anything there?
What is against placing those files in the Home directory instead of in a folder under root? Do you have multiple user accounts ?
cor-el said
What is against placing those files in the Home directory instead of in a folder under root? Do you have multiple user accounts ?
Hello cor-el, thank you for your input. I believe the reason why the files have always been placed in root is because they need to be accessed by multiple users accounts.