If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[FIX]SaveAs dialog pops up dialog 'You are not allowed to view the contents of the dir'

VERIFIED FIXED in mozilla0.9.9



16 years ago
15 years ago


(Reporter: BenB, Assigned: bz)




Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
Reproduction (under Unix; Windows 200 will differ):
0. cd /tmp
1. su root
2. mkdir downloads
3. chown root downloads
4. chgrp yourgroup downloads
5. chmod 730 downloads
   (So you get drwx-wx--.
   This means, your normal user can write to the directory and can read files
   with known filenames, but cannot list the contents of the directory.)
6. exit
7. ls downloads (you should get a "Permission denied")
8. Start Mozilla
9. Click to download a file
10. In the SaveAs dialog, walk to /tmp
11. Enter "downloads/myfile.tgz" as filename
12. Click Save button
    (The file should be correctly saved in as /tmp/downloads/myfile.tgz.)
13. Click to download another file

Actual result:
The SaveAs dialog displays, defaulting to /tmp/downloads/, but another error
dialog pops up above it, telling you that the contents if the dir cannot be
shown. You have to confirm it by clicking OK before you can proceed.

Expected result:
No dialog pops up. If a message is shown at all (which is preferable), then it
shoudl be shown in the listbox, where the contents of the dir usually appear.

I intentionally created a directory with these permissions as downlaod dir to
protect the downloaded files from potential intruders (I could explain that
more, but I'd need half a page for it). The popup dialog is very annoying,
because it pops up *every time* I want to download a file, and I have to click
it away *every time*. Talk about needless confirmation dialogs...

Additional Comments:
This didn't happen with


16 years ago
Keywords: regression
Summary: SaveAs dialog displays 'You are not allowed to view the contents of the dir' → SaveAs dialog pops up dialog 'You are not allowed to view the contents of the dir'

Comment 1

16 years ago
-> bryner

Bryner, could we do something where instead of showing this dialog we place a
"Can't display contents" in the listbox?
Assignee: jaggernaut → bryner
-> bzbarsky.  This sounds like it's related to your checkin for bug 117228.
Assignee: bryner → bzbarsky
Bug 114399, actually, but same thing.

Will look into doing something non-dialog-like here.
Priority: -- → P1
Target Milestone: --- → mozilla0.9.9
Created attachment 68324 [details] [diff] [review]
Patch v 1.0

Uses a <deck> to show the "Directory not readable" message instead of alerting
Ben, would you test this and see what you think?

bryner, would you review?
Summary: SaveAs dialog pops up dialog 'You are not allowed to view the contents of the dir' → [FIX]SaveAs dialog pops up dialog 'You are not allowed to view the contents of the dir'

Comment 6

16 years ago
Yes, fix seems to work fine. Thanks for the fast and good fix!

Comment 7

16 years ago
There is a bug in the fix: If I manually enter a dir that is viewable, e.g. I
type "/tmp" in the filename field and hit return, the dialog without the fix
shows the contents of the new directory. With the fix, the message 'No
permission" retains.
Um... I can't reproduce that one.  I pick save as from menu, get the filepicker
opened to /tmp/foo (which is not readable) and showing the error message, I type
"/tmp" in the filename field, hit enter, and get a listing for "/tmp".

Are your steps any different from those?

Comment 9

16 years ago
No, apart from that I use Save Link As..
I use something around 0.9.8 branching and had to merge one part manually. I am
updating HEAD atm, to see if that fixes it and to check that I applied the patch
Comment on attachment 68324 [details] [diff] [review]
Patch v 1.0

Attachment #68324 - Flags: review+

Comment 11

16 years ago
What I reported as "bug" was caused my wrong manualy merging on my part. Sorry.
It all works very well.

Comment 12

16 years ago
Comment on attachment 68324 [details] [diff] [review]
Patch v 1.0

Attachment #68324 - Flags: superreview+
checked in
Last Resolved: 16 years ago
Resolution: --- → FIXED
QA Contact: jrgm → sairuh
vrfy'ing per BenB.
You need to log in before you can comment on or make changes to this bug.