Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread nunojsilva
On 2019-10-19, José María Mateos wrote:

> On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
>> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
>> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
>> message in a pop-up window.  All directory names I have tried other
>> than .mutt allow the PDF file to be read.
>> 
>> Has anyone else here seen anything like this?  It would seem that it's
>> an error in evince but of some relevance to mutt use.
>
> I can't reproduce this on my end. I copied a PDF file in my ~/.mutt
> directory and all these options work:
>
> $ evince test.pdf (from inside ~/.mutt)
> $ evince .mutt/test.pdf (from my home directory)
> $ evince ~/.mutt/test.pdf (same)
>
> Cheers,

Any chance this is the same issue Marcelo Laia reported earlier this
year?

(see the thread starting with Message-ID:
<20190118120629.GE5678@localhost>, from 2019-01-18)

In that case, evince was being started from mutt, and the issue happened
with other applications as well.


URL of a web copy of the mentioned thread, at marc.info:
https://marc.info/?t=15478132762&r=1&w=2

-- 
Nuno Silva



Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Chris Green
On Sat, Oct 19, 2019 at 05:36:52PM -0400, José María Mateos wrote:
> On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> > Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> > but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> > message in a pop-up window.  All directory names I have tried other
> > than .mutt allow the PDF file to be read.
> > 
> > Has anyone else here seen anything like this?  It would seem that it's
> > an error in evince but of some relevance to mutt use.
> 
> I can't reproduce this on my end. I copied a PDF file in my ~/.mutt
> directory and all these options work:
> 
> $ evince test.pdf (from inside ~/.mutt)
> $ evince .mutt/test.pdf (from my home directory)
> $ evince ~/.mutt/test.pdf (same)
> 
Thanks for trying it José, what version of evince are you running?
Mine is "GNOME Document Viewer 3.32.0".

-- 
Chris Green


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Chris Green
On Sun, Oct 20, 2019 at 09:25:46AM +0100, Nuno Silva wrote:
> On 2019-10-19, José María Mateos wrote:
> 
> > On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> >> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> >> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> >> message in a pop-up window.  All directory names I have tried other
> >> than .mutt allow the PDF file to be read.
> >> 
> >> Has anyone else here seen anything like this?  It would seem that it's
> >> an error in evince but of some relevance to mutt use.
> >
> > I can't reproduce this on my end. I copied a PDF file in my ~/.mutt
> > directory and all these options work:
> >
> > $ evince test.pdf (from inside ~/.mutt)
> > $ evince .mutt/test.pdf (from my home directory)
> > $ evince ~/.mutt/test.pdf (same)
> >
> > Cheers,
> 
> Any chance this is the same issue Marcelo Laia reported earlier this
> year?
> 
> (see the thread starting with Message-ID:
> <20190118120629.GE5678@localhost>, from 2019-01-18)
> 
> In that case, evince was being started from mutt, and the issue happened
> with other applications as well.
> 
> 
> URL of a web copy of the mentioned thread, at marc.info:
> https://marc.info/?t=15478132762&r=1&w=2
> 
It's not exactly the same but I guess there might be a connection.  My
error occurs whether evince is called from within mutt or not, I hit
the error when I tried to move mutt's temporary directory from /tmp to
~/.mutt/tmp.  However, as I reported, I then discovered that evince
(and only evince as far as I can tell) gives permission denied for any
file in (or below) a .mutt directory.

... and I have just tried the (newer) PDF viewer atril, that works.

So "evince ~/.mutt/fred.pdf" gives a Permission Denied error, but
"atril ~/.mutt/fred.pdf" displays the file.  Very strange!

-- 
Chris Green


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Matthias Apitz
El día domingo, octubre 20, 2019 a las 09:25:46a. m. +0100, Nuno Silva escribió:

> On 2019-10-19, José María Mateos wrote:
> 
> > On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> >> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> >> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> >> message in a pop-up window.  All directory names I have tried other
> >> than .mutt allow the PDF file to be read.

I can't reproduce this on FreeBSD. The OP could run on any Linux (don't
know if the problem is on Linux):

strace -o evince.tr -f  evince ~/.mutt/fred.pdf

and look into the file evince.tr which open(2) or stat(2) gives a
Permission Denied and why. If the OP can't see this, he/she should 
post this file somewhere.

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

3. Oktober! Wir gratulieren! Der Berliner Fernsehturm wird 50 
aus: https://www.jungewelt.de/2019/10-02/index.php


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Chris Green
On Sun, Oct 20, 2019 at 11:01:02AM +0200, Matthias Apitz wrote:
> El día domingo, octubre 20, 2019 a las 09:25:46a. m. +0100, Nuno Silva 
> escribió:
> 
> > On 2019-10-19, José María Mateos wrote:
> > 
> > > On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> > >> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> > >> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> > >> message in a pop-up window.  All directory names I have tried other
> > >> than .mutt allow the PDF file to be read.
> 
> I can't reproduce this on FreeBSD. The OP could run on any Linux (don't
> know if the problem is on Linux):
> 
> strace -o evince.tr -f  evince ~/.mutt/fred.pdf
> 
> and look into the file evince.tr which open(2) or stat(2) gives a
> Permission Denied and why. If the OP can't see this, he/she should 
> post this file somewhere.
> 
>   matthias
> 
I'm running xubuntu 19.04 on both systems which show this bug.  I
don't have evince on any other system at the moment.

I will try the strace and also I may try installing evince on a system
which is running xubuntu 18.04 to see if the bug is there too.

Thanks everyone and listen to this space! :-)

-- 
Chris Green


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 09:43:51 +0100 Chris Green  wrote:
> Thanks for trying it José, what version of evince are you running?
> Mine is "GNOME Document Viewer 3.32.0".

I'm running 3.18.2 on an Ubuntu Mate 16.04 with Xfce as a desktop
manager.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread nunojsilva
On 2019-10-20, Chris Green wrote:

> On Sun, Oct 20, 2019 at 11:01:02AM +0200, Matthias Apitz wrote:
>> El día domingo, octubre 20, 2019 a las 09:25:46a. m. +0100, Nuno Silva 
>> escribió:
>> 
>> > On 2019-10-19, José María Mateos wrote:
>> > 
>> > > On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
>> > >> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
>> > >> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
>> > >> message in a pop-up window.  All directory names I have tried other
>> > >> than .mutt allow the PDF file to be read.
>> 
>> I can't reproduce this on FreeBSD. The OP could run on any Linux (don't
>> know if the problem is on Linux):
>> 
>> strace -o evince.tr -f  evince ~/.mutt/fred.pdf
>> 
>> and look into the file evince.tr which open(2) or stat(2) gives a
>> Permission Denied and why. If the OP can't see this, he/she should 
>> post this file somewhere.
>> 
>>  matthias
>> 
> I'm running xubuntu 19.04 on both systems which show this bug.  I
> don't have evince on any other system at the moment.
>
> I will try the strace and also I may try installing evince on a system
> which is running xubuntu 18.04 to see if the bug is there too.
>
> Thanks everyone and listen to this space! :-)

Do these systems have apparmor? It seems to be some sort of security
tool which restricts access to files and directories based on rules.

I don't use ubuntu (or ubuntu-based) systems nor apparmor, but this
looks like it might be related:

https://gitlab.com/apparmor/apparmor/raw/master/profiles/apparmor.d/abstractions/private-files

-- 
Nuno Silva



Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Marcelo Laia
On 20/10/19 at 09:25, Nuno Silva wrote:
> Any chance this is the same issue Marcelo Laia reported earlier this
> year?


Yea This is the same! Thank you very much!

If I start to open any doc (ods, xls, doc, odt, pdf) from mutt, this problem
occurs!

To pdf, I am using xpdf, that run out the box, both inside mutt or from command
line. For any doc, I need to save it in a directory inside /home/~ and outside
~/.mutt to open it. Inside ~/.mutt isn't possible to open they.

Here is the ls -la commands

This not work

(base) marcelo@marcelo:~$ evince /home/marcelo/.mutt/temp/Guinda.pdf

This work

(base) marcelo@marcelo:~$ xpdf /home/marcelo/.mutt/temp/Guinda.pdf> 

(base) marcelo@marcelo:~$ ls -al /home/marcelo/.mutt/temp
total 472
drwxrwxrwx 2 marcelo marcelo  86016 out 20 09:50 .
drwxr-xr-x 6 marcelo marcelo   4096 out 10 13:07 ..
-r 1 marcelo marcelo 376287 out 20 09:50 Guinda.pdf
-rw--- 1 marcelo marcelo   4096 set  4 11:22 
.mutt-marcelo-1000-18909-1679500131205276726.swp
-rw--- 1 marcelo marcelo  12288 ago 26 16:41 
.mutt-marcelo-1000-6351-11365932491811456987.swp

This not work

(base) marcelo@marcelo:~$ libreoffice 
/home/marcelo/.mutt/temp/Planilha_Agendamento_de_F__rias_2020.docx

(base) marcelo@marcelo:~$ ls -al /home/marcelo/.mutt/temp
total 160
drwxrwxrwx 2 marcelo marcelo 86016 out 20 09:53 .
drwxr-xr-x 6 marcelo marcelo  4096 out 10 13:07 ..
-rw--- 1 marcelo marcelo  4096 set  4 11:22 
.mutt-marcelo-1000-18909-1679500131205276726.swp
-rw--- 1 marcelo marcelo 12288 ago 26 16:41 
.mutt-marcelo-1000-6351-11365932491811456987.swp
-r 1 marcelo marcelo 55502 out 20 09:53 
Planilha_Agendamento_de_F__rias_2020.docx

This not work

(base) marcelo@marcelo:~$ libreoffice 
/home/marcelo/.mutt/Planilha_Agendamento_de_F__rias_2020.docx

> (see the thread starting with Message-ID:
> <20190118120629.GE5678@localhost>, from 2019-01-18)
> 
> URL of a web copy of the mentioned thread, at marc.info:
> https://marc.info/?t=15478132762&r=1&w=2


-- 
Marcelo


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Marcelo Laia
On 20/10/19 at 02:02, Nuno Silva wrote:
 
> Do these systems have apparmor? It seems to be some sort of security
> tool which restricts access to files and directories based on rules.


Bingo

root@marcelo:~# dpkg -l apparmor
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Nome   Versão   Arquitectura Descrição
+++-==---==
ii  apparmor   2.13.3-5 amd64user-space parser utility for 
AppArmor
root@marcelo:~# 


-- 
Marcelo


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 10:15:34 -0300 Marcelo Laia 
wrote:
> root@marcelo:~# dpkg -l apparmor
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/
> Nome   Versão   Arquitectura Descrição
> +++-==---==
> ii  apparmor   2.13.3-5 amd64user-space parser
> utility for AppArmor root@marcelo:~# 

Following up on this, I am pasting here below the contents of
my /etc/apparmor.d/usr.bin.evince, which allows me to use .mutt as a
folder for pdf files. I guess the culprit should be there (tl;dr: grep
mutt /etc/apparmor.d/usr.bin.evince returns nothing).

---
# vim:syntax=apparmor

# evince is not written with application confinement in mind and is designed to
# operate within a trusted desktop session where anything running within the
# user's session is trusted. That said, evince will often process untrusted
# input (PDFs, images, etc). Ideally evince would be written in such a way that
# image processing is separate from the main process and that processing
# happens in a restrictive sandbox, but unfortunately that is not currently the
# case. Because evince will process untrusted input, this profile aims to
# provide some hardening, but considering evince's design and other factors such
# as X, gsettings, accessibility, translations, DBus session and system
# services, etc, complete confinement is not possible.

#include 

/usr/bin/evince {
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  #include 
  #include 
  #include 
  #include 
  #include 

  # For now, let evince talk to any session services over dbus. We can
  # blacklist any problematic ones (but note, evince uses libsecret :\)
  #include 

  #include 
  dbus (receive) bus=system,
  # Allow getting information from various system services
  dbus (send)
  bus=system
  member="Get*"
  peer=(label=unconfined),
  # Allow talking to avahi with whatever polkit allows
  dbus (send)
  bus=system
  interface="org.freedesktop.Avahi{,.*}",
  # Allow talking to colord with whatever polkit allows
  dbus (send)
  bus=system
  interface="org.freedesktop.ColorManager{,.*}",

  # Terminals for using console applications. These abstractions should ideally
  # have 'ix' to restrict access to what only evince is allowed to do
  #include 

  # By default, we won't support launching a terminal program in Xterm or
  # KDE's konsole. It opens up too many unnecessary files for most users.
  # People who need this functionality can uncomment the following:
  ##include 
  ##include 

  /usr/bin/evince rmPx,
  /usr/bin/evince-previewer Px,
  /usr/bin/yelp Cx -> sanitized_helper,
  /usr/bin/bug-buddy px,
  # 'Show Containing Folder' (LP: #1022962)
  /usr/bin/nautilus Cx -> sanitized_helper, # Gnome
  /usr/bin/pcmanfm Cx -> sanitized_helper,  # LXDE
  /usr/bin/krusader Cx -> sanitized_helper, # KDE
  /usr/bin/thunar Cx -> sanitized_helper,   # XFCE

  # For Xubuntu to launch the browser
  /usr/bin/exo-open ixr,
  /usr/lib/@{multiarch}/xfce4/exo-1/exo-helper-1 ixr,
  /etc/xdg/xdg-xubuntu/xfce4/helpers.rc r,
  /etc/xdg/xfce4/helpers.rc r,

  # For text attachments
  /usr/bin/gedit ixr,

  # For Send to
  /usr/bin/nautilus-sendto Cx -> sanitized_helper,

  # GLib desktop launch helper (used under the hood by g_app_info_launch)
  /usr/lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop rmix,
  /usr/bin/env ixr,

  # allow directory listings (ie 'r' on directories) so browsing via the file
  # dialog works
  / r,
  /**/ r,

  # This is need for saving files in your home directory without an extension.
  # Changing this to '@{HOME}/** r' makes it require an extension and more
  # secure (but with 'rw', we still have abstractions/private-files-strict in
  # effect).
  owner @{HOME}/** rw,
  owner /media/**  rw,
  owner @{HOME}/.local/share/gvfs-metadata/** l,
  owner /{,var/}run/user/*/gvfs-metadata/** l,

  owner @{HOME}/.gnome2/evince/*   rwl,
  owner @{HOME}/.gnome2/accels/rw,
  owner @{HOME}/.gnome2/accelsevince   rw,
  owner @{HOME}/.gnome2/accels/evince  rw,

  # Maybe add to an abstraction?
  /etc/dconf/**   r,
  owner @{HOME}/.cache/dconf/user rw,
  owner @{HOME}/.config/dconf/userr,
  owner /{,var/}run/user/*/dconf/ w,
  owner /{,var/}run/user/*/dconf/user rw,
  owner /{,var/}run/user/*/dconf-service/keyfile/ w,
  owner /{,var/}run/user/*/dconf-service/keyfile/user rw,

  owner /{,var/}run/user/*/at-spi2-*/   rw,
  owner /{,var/}run/user/*/at-spi2-*/** rw,

  # from http://live.gnome.org/Evince/SupportedDocumentFormats. Allow
  # read and write for all supported file formats
  /**.[bB][mM][pP] rw,
  /**.[dD][jJ][vV][uU] rw,
  /**.[dD][vV][iI] rw,
  /**.[gG][

Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread nunojsilva
On 2019-10-20, José María Mateos wrote:

> On Sun, 20 Oct 2019 10:15:34 -0300 Marcelo Laia 
> wrote:
>> root@marcelo:~# dpkg -l apparmor
>> Desired=Unknown/Install/Remove/Purge/Hold
>> |
>> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/
>> Nome   Versão   Arquitectura Descrição
>> +++-==---==
>> ii  apparmor   2.13.3-5 amd64user-space parser
>> utility for AppArmor root@marcelo:~# 
>
> Following up on this, I am pasting here below the contents of
> my /etc/apparmor.d/usr.bin.evince, which allows me to use .mutt as a
> folder for pdf files. I guess the culprit should be there (tl;dr: grep
> mutt /etc/apparmor.d/usr.bin.evince returns nothing).

Does "grep -R mutt /etc/apparmor.d/" return anything?

I suspect that, in a system with this issue, the problematic rule would
be in abstractions/private-files, and usr.bin.evince includes
abstractions/evince[1] which includes abstractions/private-files.

[1] 
https://www.apt-browse.org/browse/debian/jessie/main/all/apparmor-profiles-extra/1.4/file/etc/apparmor.d/abstractions/evince

-- 
Nuno Silva



Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread nunojsilva
On 2019-10-20, Marcelo Laia wrote:

> On 20/10/19 at 02:02, Nuno Silva wrote:
>  
>> Do these systems have apparmor? It seems to be some sort of security
>> tool which restricts access to files and directories based on rules.
>
>
> Bingo
>
> root@marcelo:~# dpkg -l apparmor
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Nome   Versão   Arquitectura Descrição
> +++-==---==
> ii  apparmor   2.13.3-5 amd64user-space parser utility for 
> AppArmor
> root@marcelo:~# 

By the way: it seems that the .mutt rule was added to the apparmor
upstream repository during November 2018[1], which would explain why
this is something that didn't happen before.

[1] 
https://gitlab.com/apparmor/apparmor/commit/170e8d6ac8eb867d40f3361e1814b2304d647860

-- 
Nuno Silva



Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread José María Mateos
On Sun, 20 Oct 2019 15:05:24 +0100  (Nuno Silva)
wrote:
> Does "grep -R mutt /etc/apparmor.d/" return anything?
> 
> I suspect that, in a system with this issue, the problematic rule would
> be in abstractions/private-files, and usr.bin.evince includes
> abstractions/evince[1] which includes abstractions/private-files.

For me, just this line:

/etc/apparmor.d/abstractions/ubuntu-console-email:  /usr/bin/mutt Cx -> 
sanitized_helper,

But take into account that I have no problems with evince in .mutt.

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Marcelo Laia
On 20/10/19 at 03:05, Nuno Silva wrote:

> Does "grep -R mutt /etc/apparmor.d/" return anything?

root@marcelo:~# grep -R mutt /etc/apparmor.d/
/etc/apparmor.d/abstractions/wayland:  owner 
/run/user/*/{mesa,mutter,sdl,wayland-cursor,weston,xwayland}-shared-* rw,
/etc/apparmor.d/abstractions/X:  owner /run/user/*/.mutter-Xwaylandauth.* r,
/etc/apparmor.d/abstractions/private-files:  deny @{HOME}/.mutt** mrwkl,
/etc/apparmor.d/abstractions/ubuntu-console-email:  /usr/bin/mutt Cx -> 
sanitized_helper,
root@marcelo:~#

 


-- 
Marcelo


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Marcelo Laia
On 20/10/19 at 12:33, Marcelo Laia wrote:
> On 20/10/19 at 03:05, Nuno Silva wrote:
> 
> > Does "grep -R mutt /etc/apparmor.d/" return anything?
> 
> root@marcelo:~# grep -R mutt /etc/apparmor.d/
> /etc/apparmor.d/abstractions/private-files:  deny @{HOME}/.mutt** mrwkl,
 
If I comment that line in /etc/apparmor.d/abstractions/private-file,
libreoffice and evince run out of the box! :) Very nice

I need to edit /etc/apparmor.d/abstractions/private-files

  # privacy violations (don't audit files under $HOME otherwise get a
  # lot of false positives when reading contents of directories)
  deny @{HOME}/.*history mrwkl,
  deny @{HOME}/.fetchmail* mrwkl,
#  deny @{HOME}/.mutt** mrwkl,
  deny @{HOME}/.viminfo* mrwkl,
  deny @{HOME}/.*~ mrwkl,
  deny @{HOME}/.*.swp mrwkl,
  deny @{HOME}/.*~1~ mrwkl,
  deny @{HOME}/.*.bak mrwkl,

and comment the line deny @{HOME}/.mutt** mrwkl,

Need to restart apparmor

# systemctl start apparmor

Thank you very much!

Until November, 2018 I was in trouble with this behavor!

But, the big question:

What is the implications in comment that line? There are security issues?

-- 
Marcelo


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Chris Green
On Sun, Oct 20, 2019 at 02:02:15PM +0100, Nuno Silva wrote:
> On 2019-10-20, Chris Green wrote:
> 
> > On Sun, Oct 20, 2019 at 11:01:02AM +0200, Matthias Apitz wrote:
> >> El día domingo, octubre 20, 2019 a las 09:25:46a. m. +0100, Nuno Silva 
> >> escribió:
> >> 
> >> > On 2019-10-19, José María Mateos wrote:
> >> > 
> >> > > On Sat, 19 Oct 2019 19:17:06 +0100 Chris Green  wrote:
> >> > >> Running 'evince ~/.mitt/fred.pdf' displays the PDF file successfully
> >> > >> but running 'evince ~/.mutt/fred.pdf' produces a Permission Denied
> >> > >> message in a pop-up window.  All directory names I have tried other
> >> > >> than .mutt allow the PDF file to be read.
> >> 
> >> I can't reproduce this on FreeBSD. The OP could run on any Linux (don't
> >> know if the problem is on Linux):
> >> 
> >> strace -o evince.tr -f  evince ~/.mutt/fred.pdf
> >> 
> >> and look into the file evince.tr which open(2) or stat(2) gives a
> >> Permission Denied and why. If the OP can't see this, he/she should 
> >> post this file somewhere.
> >> 
> >>matthias
> >> 
> > I'm running xubuntu 19.04 on both systems which show this bug.  I
> > don't have evince on any other system at the moment.
> >
> > I will try the strace and also I may try installing evince on a system
> > which is running xubuntu 18.04 to see if the bug is there too.
> >
> > Thanks everyone and listen to this space! :-)
> 
> Do these systems have apparmor? It seems to be some sort of security
> tool which restricts access to files and directories based on rules.
> 
> I don't use ubuntu (or ubuntu-based) systems nor apparmor, but this
> looks like it might be related:
> 
> https://gitlab.com/apparmor/apparmor/raw/master/profiles/apparmor.d/abstractions/private-files
> 
I just removed apparmor from one of my systems (I can see no use for
it anyway), I still get the error with evince.

-- 
Chris Green


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Nathan Stratton Treadway
On Sun, Oct 20, 2019 at 18:04:05 +0100, Chris Green wrote:
> I just removed apparmor from one of my systems (I can see no use for
> it anyway), I still get the error with evince.

I'm not using Ubuntu 19.04 myself and so can't say whether or not your
problem is caused by Apparmor, but if you just did "apt-get remove
apparmor" to remove the package, I'm not sure that operation actually
disables Apparmor enforcement.

(That is, at least on my Bionic/18.04 system, with a quick look through
the /var/lib/dpkg/info/apparmor.{pre,post}rm scripts I'm not seeing
seeing any logic to turn off enforcement during a package-remove
operation.)

So, you may still want to look closely in your system log files to see
if there are any Apparmor access-denied messages, just in case removing
the package isn't enough to eliminate the evince-profile restriction

Nathan


Re: Really strange problem with evince PDF reader and .mutt directory

2019-10-20 Thread Marcelo Laia
Please, could you purged apparmor and restarted the system? I think you
have uninstalled the program, but, his symptoms continued.

Em dom, 20 de out de 2019 15:04, Chris Green  escreveu:

> On Sun, Oct 20, 2019 at 02:02:15PM +0100, Nuno Silva wrote:
> >
> I just removed apparmor from one of my systems (I can see no use for
> it anyway), I still get the error with evince.
>
> --
> Chris Green
>