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. Rationale: 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 0.9.4.1.
-> bryner Bryner, could we do something where instead of showing this dialog we place a "Can't display contents" in the listbox?
-> bzbarsky. This sounds like it's related to your checkin for bug 117228.
Bug 114399, actually, but same thing. Will look into doing something non-dialog-like here.
Created attachment 68324 [details] [diff] [review] Patch v 1.0 Uses a <deck> to show the "Directory not readable" message instead of alerting it.
Ben, would you test this and see what you think? bryner, would you review?
Yes, fix seems to work fine. Thanks for the fast and good fix!
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?
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 correctly.
Comment on attachment 68324 [details] [diff] [review] Patch v 1.0 r=bryner
What I reported as "bug" was caused my wrong manualy merging on my part. Sorry. It all works very well.
Comment on attachment 68324 [details] [diff] [review] Patch v 1.0 sr=jag
vrfy'ing per BenB.