Can't read from or write to directories symlinked across partitions
Using Ubuntu 22.04. I can upload and download files from /tmp and also from any directory on the home partition (or symlinked entirely within the home partition). However, I have a data partition with symlinks in the home partition, and Firefox throws a permissions error when I try to read or write from or write to one of those symlinked directories. So far, Firefox is the only app that exhibits this behavior.
I believe I need to change the "Security Context" in Firefox, but I haven't been able to figure out how to do that.
I describe the problem more fully here:
I will have to abandon Firefox if I can't fix this.
Thanks!
Выбранное решение
I seem to have solved the problem by executing `sudo aa-complain /usr/lib/firefox/firefox`. Thank you chatGPT.
I don't know how the `apparmor` profile was created in the first place, but I certainly didn't do it.
Прочитайте этот ответ в контексте 👍 0Все ответы (5)
If you are using the Firefox Snap version then you may be out of luck.
You can try Firefox from the official Mozilla server if you currently use a version from the repositories of your Linux distribution to see if it behaves differently.
Thank you for the prompt response. I've been using the firefox version from the mozillateam ppa. Running the version you linked to *does* solve the problem
The difference between the two versions is evident from System Monitor:
- for the ppa version, "Security Context" = "firefox (enforce)"
- for the downloaded version, "Security Context" = "unconfined"
I'd really like to understand what controls this setting.
Выбранное решение
I seem to have solved the problem by executing `sudo aa-complain /usr/lib/firefox/firefox`. Thank you chatGPT.
I don't know how the `apparmor` profile was created in the first place, but I certainly didn't do it.
Ubuntu has an apparmor profile for /usr/lib/firefox/firefox. It would be preferable to keep enforcing it and instead add paths you want to be accessible to /etc/apparmor.d/tunables/home or /etc/apparmor.d/local/usr.bin.firefox. Apply changes with sudo service apparmor reload.
@zeroknight Genuine thanks for the response. I understand that the ideal solution is to modify the apparmor profile, but I'm sticking with my chosen solution. The recent install of firefox from the PPA (on a newly installed ubuntu 22.04 image) has been several crippling problems that are difficult to debug, most prominently the symlinks issue and FF not launching the zoom app. I was very close to ditching Firefox. I hope that doesn't prove necessary down the line.