Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st August 2012, 10:13 PM
B o r e a l i s Offline
Registered User
 
Join Date: Aug 2012
Location: Finland
Posts: 5
linuxfirefox
Not able to save pdf file in Firefox

I have Fedora 17 64 bit, Firefox 14 and Adobe Reader 8.2 (FIN).

http://www.if-not-true-then-false.co...-red-hat-rhel/

I used that guide to install Adobe Reader and it works nicely. There was some selinux warnings, but I ignored them.

I can save PDF file if I grab the link with right mouse button and press save. Then I can go into folder and open that PDF file.

However if I open that PDF file in the browser and try to save the file from there, it says that I don´t have rights to do so.

How I can fix this?

Last time I was using Fedora was Fedora 4.. :-) Now jumping from Windows 7 to Fedora 17. Using Android alot too. But have to say that Fedora 17 looks nice!
Reply With Quote
  #2  
Old 2nd August 2012, 05:51 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,707
linuxfirefox
Re: Not able to save pdf file in Firefox

Quote:
Originally Posted by B o r e a l i s View Post
However if I open that PDF file in the browser and try to save the file from there, it says that I don´t have rights to do so.
Could you post the exact error message, or a screen-shot?
Reply With Quote
  #3  
Old 3rd August 2012, 01:26 PM
B o r e a l i s Offline
Registered User
 
Join Date: Aug 2012
Location: Finland
Posts: 5
linuxfirefox
Re: Not able to save pdf file in Firefox

Well there you go. My system is in Finnish. It just don't allow me to save the file that way.
Attached Thumbnails
Click image for larger version

Name:	Kuvakaappaus 2012-08-03 09:15:10.png
Views:	79
Size:	146.3 KB
ID:	23564  
Reply With Quote
  #4  
Old 3rd August 2012, 06:18 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Not able to save pdf file in Firefox

Can you post a screenshot of the above after you click the details button?

I wonder where Firefox is trying to save the pdf file? it's being blocked by SELinux, which should allow it to save files in your /home folder.

But, click on the details button and post that here. That will give a lot more information (hopefully) and maybe even give you the fix to the problem.
Reply With Quote
  #5  
Old 3rd August 2012, 06:44 PM
errorxp's Avatar
errorxp Offline
Registered User
 
Join Date: Jul 2007
Posts: 371
linuxfirefox
Re: Not able to save pdf file in Firefox

Just disable selinux or put it in permissive mode unless you really need it.
__________________
these command lines are like casino slot machines, every time I input commands NOTHING HAPPENS
Reply With Quote
  #6  
Old 3rd August 2012, 06:47 PM
B o r e a l i s Offline
Registered User
 
Join Date: Aug 2012
Location: Finland
Posts: 5
linuxfirefox
Re: Not able to save pdf file in Firefox

SELinux is preventing /usr/lib/ld-2.15.so from create access on the message queue .

***** Plugin catchall (100. confidence) suggests ***************************

If you believe that ld-2.15.so should be allowed create access on the msgq by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep ld-linux.so.2 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
0.c1023
Target Context unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
0.c1023
Target Objects [ msgq ]
Source ld-linux.so.2
Source Path /usr/lib/ld-2.15.so
Port <Tuntematon>
Host masiina
Source RPM Packages glibc-2.15-51.fc17.i686
Target RPM Packages
Policy RPM selinux-policy-3.10.0-142.fc17.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name masiina
Platform Linux masiina 3.5.0-2.fc17.x86_64 #1 SMP Mon Jul
30 14:48:59 UTC 2012 x86_64 x86_64
Alert Count 1
First Seen pe 3. elokuuta 2012 20.42.15
Last Seen pe 3. elokuuta 2012 20.42.15
Local ID 1cc84c05-79fc-4207-b540-109730150359

Raw Audit Messages
type=AVC msg=audit(1344015735.930:319): avc: denied { create } for pid=8729 comm="ld-linux.so.2" key=1107427732 scontext=unconfined_u:unconfined_r:mozilla_plugin_ t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:mozilla_plugin_ t:s0-s0:c0.c1023 tclass=msgq


type=SYSCALL msg=audit(1344015735.930:319): arch=i386 syscall=setresuid per=8 success=no exit=EACCES a0=d a1=42020194 a2=3c0 a3=0 items=0 ppid=8707 pid=8729 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=ld-linux.so.2 exe=/usr/lib/ld-2.15.so subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: ld-linux.so.2,mozilla_plugin_t,mozilla_plugin_t,msgq, create

audit2allow

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t self:msgq create;

audit2allow -R

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t self:msgq create;



XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX

That's what on details. And of course I would like to keep SELinux on, this is probably a bug.

---------- Post added at 08:47 PM ---------- Previous post was at 08:47 PM ----------

That warning pops up when pdf file gets loaded and when I try to save it.
Reply With Quote
  #7  
Old 3rd August 2012, 06:57 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Not able to save pdf file in Firefox

Well, it does tell you what you need to do to allow the write.

Code:
su -
(root password)

grep ld-linux.so.2 /var/log/audit/audit.log | audit2allow -M mypol

semodule -i mypol.pp
Reply With Quote
  #8  
Old 3rd August 2012, 08:14 PM
B o r e a l i s Offline
Registered User
 
Join Date: Aug 2012
Location: Finland
Posts: 5
linuxfirefox
Re: Not able to save pdf file in Firefox

Cool, it's working now. I should have tried that, but wasn't sure about that so I did not try it.
Reply With Quote
  #9  
Old 4th August 2012, 04:37 PM
Bad2theBone's Avatar
Bad2theBone Offline
Registered User
 
Join Date: Jan 2007
Location: Lawrenceville, Georgia
Posts: 352
linuxfirefox
Re: Not able to save pdf file in Firefox

I also get similar errors in Firefox when I try to download PDFs and save them. The file will download and open in Evince, but when I try to save it I get the following SELinux error:

SELinux is preventing /usr/bin/evince from write access on the file /home/scott/rest of path/file.pdf.

***** Plugin catchall (100. confidence) suggests ***************************

If you believe that evince should be allowed write access on the file.pdf file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep EvJobScheduler /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
0.c1023
Target Context unconfined_u:object_r:user_home_t:s0
Target Objects /home/scott/rest of path/file.pdf [ file ]
Source EvJobScheduler
Source Path /usr/bin/evince
Port <Unknown>
Host ncc1701.localdomain
Source RPM Packages evince-3.4.0-2.fc17.x86_64
Target RPM Packages
Policy RPM selinux-policy-3.10.0-142.fc17.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name ncc1701.localdomain
Platform Linux ncc1701.localdomain 3.5.0-2.fc17.x86_64 #1
SMP Mon Jul 30 14:48:59 UTC 2012 x86_64 x86_64
Alert Count 3
First Seen Tue 17 Jul 2012 09:45:21 AM EDT
Last Seen Sat 04 Aug 2012 10:57:35 AM EDT
Local ID fb84bb58-b6ca-4692-ba61-c097bfb21db0

Raw Audit Messages
type=AVC msg=audit(1344092255.698:382): avc: denied { write } for pid=4184 comm="EvJobScheduler" path="/home/scott/rest of path/file.pdf" dev="dm-13" ino=264250 scontext=unconfined_u:unconfined_r:mozilla_plugin_ t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1344092255.698:382): arch=x86_64 syscall=open success=no exit=EACCES a0=7faf38741a80 a1=c1 a2=1b6 a3=aaaaaaaaaaaaaaab items=0 ppid=1 pid=4184 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=EvJobScheduler exe=/usr/bin/evince subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: EvJobScheduler,mozilla_plugin_t,user_home_t,file,w rite

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t user_home_t:file write;

audit2allow -R

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t user_home_t:file write;

The process created a 0 Byte file, but was unable to write the contents of the downloaded file into this empty file. I then did what it said to do:

# grep EvJobScheduler /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

It did save it after that, but I still got the error. I in the past would copy the downloaded file from /tmp/mozilla-????/ to where I wanted it by using drag & drop in nautilus dual pane. It seems that Firefox is no longer creating this temporary folder under /tmp for temporary access to the file, or suddenly it's downloading the temporary file somewhere else that I can't find.

I don't understand this part:

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t user_home_t:file write;

audit2allow -R

#============= mozilla_plugin_t ==============
#!!!! This avc is allowed in the current policy

allow mozilla_plugin_t user_home_t:file write;

Anyone tell me what to do here? Would this fix it for all ocassions that I save downloaded files with Evince? I have also have it happen with LibreOffice, when I download a M$Office file that launches the appropriate LibreOffice App and then try to save it anywhere on my system, not just a folder (subdir) within my home path.
__________________
Hey, I was born confused, what's your excuse?!?!?! :D
AMD Phenom II 965 64 X4, MSI 890FXA-GD70 8 GB (4x2GB) 1600 DDR3 RAM Corsair, Video = AMD HD5770 w/1GB VRAM, SATAIII SSD 1 = 256GB, SATAIII 2 = 600GB, SATAII 3 = 1.0TB, SATAII 4 = 1.0TB, SATAIII 5 = 1.0TB, SATA 7 = ASUS DVD/CD, Corsair HX850W, CoolMaster ATCS840 OS = Fedora 18
Reply With Quote
  #10  
Old 31st August 2012, 12:43 AM
davo555a Offline
Registered User
 
Join Date: Aug 2012
Location: Australia
Posts: 1
linuxfirefox
Re: Not able to save pdf file in Firefox

I had this problem, seems the firefox browser, in the preferences-applications tab, has set a version of Mozplugger to open pdf files (one of their programs to handle quicktime files). I changed it in that applications tab to read use "Document Viewer (Defealt)"

In short: in firefox choose: Edit-preferences-applications
Scroll down to the pdf file entry and change the default program to open pdf files.

Fixed it for me.
Reply With Quote
  #11  
Old 27th September 2012, 04:46 PM
pfong Offline
Registered User
 
Join Date: Sep 2012
Location: california
Posts: 5
linuxfirefox
Re: Not able to save pdf file in Firefox

Mr selinux error on Fedora 17 on x86_64 is different.
I get:
SELinux is preventing /opt/Adobe/Reader9/Reader/intellinux/bin/acroread from 'create' accesses on the file test.pdf.

I created a bug for this.
Reply With Quote
  #12  
Old 27th September 2012, 09:18 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Not able to save pdf file in Firefox

That's not really a bug in Fedora's SELinux policy since you are running a non-Fedora package.

You need to allow the access if you wish to by doing what the message you get tells you to do.

Code:
su -
(root password)

grep acroread /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp
Reply With Quote
  #13  
Old 28th September 2012, 05:40 AM
pfong Offline
Registered User
 
Join Date: Sep 2012
Location: california
Posts: 5
linuxfirefox
Re: Not able to save pdf file in Firefox

When I do sudo semodule -i mypol.pp, I get:
libsepol.scope_copy_callback: entropyd: Duplicate declaration in module: type/attribute entropyd_var_run_t (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
semodule: Failed!
Reply With Quote
Reply

Tags
file, firefox, pdf, save

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox and gnome file-save dialog problem. Thetargos Using Fedora 1 28th March 2008 09:09 PM
firefox wants to save php pages ibpalle Using Fedora 3 29th July 2006 04:19 AM
Automatic type text , delete file and save file problem shown in FC3 and FC2 kalpana EOL (End Of Life) Versions 1 10th June 2005 04:50 AM


Current GMT-time: 09:31 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat