Closed Bug 336774 Opened 18 years ago Closed 18 years ago

downloaded file is given incomplete access permissions - not accessible via network

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 224692

People

(Reporter: pacechristopher, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060504 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060504 Minefield/3.0a1

Use the standard download manager to download a file, for example an executable installation program. Save the file to disk on the local machine but in a shared network directory, such as shared documents (in Windows XP, make the directory shared with network users). Download Manager saves the file with limited file access permissions - "SYSTEM" and "Administrators". It fails to assign "Users" and "Everyone" read-only permissions (R). Without these, network users can not access the file even though it is in a shared directory. It also appears that even though the directory the file is saved to specifies that the file should inherit the directory's permissions, Download Manager does not set the file to inherit permissions. Hope this helps.

Reproducible: Always

Steps to Reproduce:
See detailed description above, this is repeatable on Windows XP machines.
The file permissions can be verified with the XCACLS.EXE utility in the Windows support tools package, this is a command line utility.
OR, UNG Software Developers Group's File Security Manager can be used under Windows XP as a more user friendly way to examine the file permissions.
Please let me know if I can be of further help, sorry if this is bug is already reported, I searched but could not find it.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

I confirm this bug - I have XP Home version and have faced the identical problems. My setup: Files downloaded by Download Manager are being saved to a folder that is being shared in the network (read-only access), also the appropriate permissions on the folder are set for files and subdirectories to inherit the permissions of a shared folder. 

Downloading any file through Download Manager makes it inaccessible via the network. Futher analysis using XP Home command line utility CACLS.exe shows that the file is lacking Everone:R permissions. Setting it manually via CACLS.exe solves the problem.

In search of a solution I have found a forum thread about a similar problem in eMule software: http://forum.emule-project.net/lofiversion/index.php/t81651.html . There is a suugestion there that a file is being saved to a temporary directory first, and than copied, so the permissions of a file in a temporary directory apply to the downloaded file. I don't know if this is correct though. 

It is possible that the bug activates when the file is big, maybe because of 
different temporary procedure - I don't know that, but I observed the bug while downloading files 2-200 megabytes big.

Steps to repoduce:
1. Enable Windows file sharing (I can only use Simple File Sharing as I'm on Win XP Home)
2. Share a folder on a hard-drive on Sharing tab of its Properties dialog
3. Check if you can access the files shared from another computer
4. Download a new file to this folder using Download Manager
5. Try to access file via the network

Actual results:
Although you can see the filename, the file itself is not accessible (read error)

Expected results:
The file should be accessible as every other file in the directory.

Temporary solution for XP Home:
1. Run cmd.exe
3. Enter "cacls <path to shared directory>\*.* /t /e /g everyone:r" in the command line and press ENTER. This will reset the read-only permissions for every file and subdirectory of a shared folder.

This bug is quite annoying for XP Home users as the system gives no clue of why the file is not accessible, I had to do a research to find a command line utility showing which exact permissions are missing. 
This problem hasn't always existed with Firefox. My best guess would be that it came with the upgrade to version 1.5.0.7.  It still exists in 2.0.

On a windows XP system, files downloaded using Firefox and saved directly to a directory that is shared on the Microsoft Windows Network are not accessible by users on machines with access to that directory.  All files in that (shared) directory that were not saved there by means of a download by Firefox *are* accessible by such users.  The inaccesible files can be "seen" by network computers, just not used, opened, modified, etc.  

Now, if a file that was dowloaded using Firefox is *moved* to a directory that is shared over the network, there is no problem.  This includes the case in which a file is downloaded using Firefox to a shared directory (file inaccessible over the network) then moved to a subdirectory (file becomes accessible over the network).

Reproduction:
1. Enable sharing on the folder that Firefox downloads to and see that there exists at least one file there that wasn't downloaded there using Firefox.  See that such files are accessible over the Windows Network.
2. Download something using Firefox (to this now shared directory).
3. Try to access it over the Windows Network.
   ---note that you can't.
4. Move the file to a subdirectory of the shared directory.
5. Try to access it over the Windows Network.
   ---note that you can.
The problem can be reproduced on a single computer with a shared directory, an admin account and a limited account :
1- download a file to the shared directory with the admin account
2- try to open it from the limited account, you get a "permission denied" error

As the problem cannot be reproduced with IE, I tested a download with ietabs extension but it gave the same result.

Note that it is possible to modify file permissions in Windows XP home using the windows explorer : Find a french dictionary, here is the procedure to upgrade and configure Windows explorer: http://www.hotline-pc.org/permissionsntfs.htm.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.