Pointing new profiles to directory other than default may cause loss of data when deleting the profile

RESOLVED DUPLICATE of bug 302087

Status

()

defect
--
critical
RESOLVED DUPLICATE of bug 302087
15 years ago
14 years ago

People

(Reporter: jeremiah.abbott, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

When creating a new profile, and pointing it to a location other than the
default C:\Documents and Settings\<User Name>\App.
Data\Mozilla\Firefox\Profiles, Firefox does not create a subdirectory under the
specified path. Example: If I create a new profile and point it to C:\Profiles,
then my entire profile will be created in C:\Profiles, instead of
C:\Profiles\xxxxxxxx.ProfileName. If I use the Profile Manager to delete the
profile, the entire C:\Profiles folder is deleted. I do technical support for
MozSource's email support and had a user with this issue where their "My
Documents" folder's contents was deleted because they pointed it to "My
Documents" for their profile folder.

Reproducible: Always

Steps to Reproduce:
1. Launch Firefox with "firefox.exe -profilemanager"
2. Create a new profile in a non-default folder
3. Start Firefox so the profile data is created
4. Exit Firefox
5. Launch Firefox with "firefox.exe -profilemanager"
6. Delete the new profile
7. Choose to "Delete Files"

Actual Results:  
The new profile and it's folder are deleted.

Expected Results:  
Firefox should have created a subfolder in the path that the profile manager was
pointed to during the profile creation, or a "backup" folder should be created
within the "Profiles" folder containing a backup of any folder before it is
deleted via the profile manager.

I would hate to see what happens if someone made the mistake of pointing it
directly to the C:\ drive. It wouldn't be able to delete the entire contents,
but may cause system instability.

Comment 1

14 years ago
I had a probleme with firefox: I couldn't start it without a new profiles. I
create a new one and now i have lost all my bookmarks and evrything. And I can
not find my old profile.

P.S. I speak french but understand english...

henri@klunge.ch

Comment 2

14 years ago
The same problem occurs for me with FireFox 1.0.2 on Windows XP SP2, i.e. a
subfolder of the profile name is not created. I can access the profile stored on
an external firewire drive. However when I try to access the same folder over
the network firefox does nothing - when I click on File on the menu bar nothing
appears - eventhough I can close down firefox. 
This scenario did not for for mozilla in 1.4 but was fixed in Moz 1.5 I have to
revert back to Mozilla 1.7.6 until this bug is fixed - I want to access my
profile from anywhere on the network.
BTW, profile.ini stores the correct directory info but firefox can't seem to load. 

Comment 3

14 years ago
I created a profile in My Documents then deleted that profile. I spent half a
day and $40 on software to recover my 300MB of data that I deleted in My
Documents when I deleted my profile.

Comment 4

14 years ago
Confirmed in Firefox 1.0.4 en-GB.

When using the Create Profile wizard, a subfolder for the profile is created in
the default path, with the name 'xxxxxxxx.profile name'.

If you change the location from the default, a subfolder is no longer created. A
user who does not notice this might end up creating a profile in an unexpected
location like My Documents.

If a user then deletes the profile through Profile Manager and selects the
'Delete Files' option, they could delete files they do not want to delete -
files other than those belonging to the profile.

There have been cases on the support forum of people deleting the contents of
their Desktop or My Documents folders (as one of the comments in this bug
reports first hand).

It requires that the user first does not notice the incorrect profile path in
the Create Profile dialog, and then does not notice the folder to be deleted in
the Delete Profile dialog - but it obviously does happen.

Comment 5

14 years ago
Confirmed in Firefox 1.0.6 en-GB

Comment 6

14 years ago
It was pointed out in Bug 270705 , comment 3, that it is by design that Fx does
not create a subdirectory.  The reason was so system administrators can specify
the exact profile directory.  It would be simple to add a "Create Directory"
button in the profile manager to allow users to specify a directory name, but
that would prevent use of a common directory for multiple computers.

One partial solution would be to display a very prominent warning at the time of
creating the profile.  The warning should state that (1) no subdirectory will be
created for the profile, that (2) this should be a new directory, and (3) that
the directory and any files in it may be deleted.  By creating the warning at
the time of creation, users will be discouraged from mixing user data with the
profile and later having to sort it out.  When creating warnings, it is useful
to remember that that profile creation is served up to unwary, casual users who
are not prepared for disasterous consequences.

To protect users of current versions, who have already mixed their profile with
user data, deletion of a profile should cause display of a more prominent
message than at present (see bug 302087).

Comment 7

14 years ago
Confirmed for Linux.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050418 Firefox/1.0.3
(Debian package 1.0.3-1)

Updated

14 years ago
Blocks: 304290

Comment 8

14 years ago
Another approach to this problem ist bug 304290 (status now: new):
when creating a new profile and choosing the 'choose folder' option, the folder
selected in the treeview should NOT be 'My Documents', because this could lead
some people to create their profile there. See this bug or bug 270705 for
consequences...
This would not completly solve the problem, but makes it less probable that
users select 'My Documents' as profilefolder, which is besides a root directory
the worst choice....
...take a look at it, i think it is really realistic to change at least this!

Updated

14 years ago
Blocks: 302087

Updated

14 years ago
Blocks: 305551

Comment 9

14 years ago

*** This bug has been marked as a duplicate of 302087 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE

Comment 10

14 years ago
I wouldn't say this is a duplicate of 302087.  302087 and 305551 together
comprise one possible solution for this bug.

Comment 11

14 years ago
There is a simple, elegant solution.  Vectorspace has stated it very nicely and
has allowed me to quote him:

"A better solution might be for Firefox to maintain a list of all files and
folders in the profile folder, and to only delete those. It must access all
files in the profile folder that are a part of the profile (whether user, FF, or
extension created) at startup anyway, so it shouldn't be hard to generate a list."

This would be a permanent, absolute fix for the problem, and it would work even
if the Profile-Manager UI ceased to exist.  In my opinion, this is the right way
to fix it.

Comment 12

14 years ago
I hadn't expected you to reference my name, so thanks.

While I don't pretend to have specific knowledge of Firefox's inner workings, it
must access every file in the profile that is a part of the profile at some
point, right? If so, then it shouldn't be too hard to simply add the filenames
to a list somewhere.

It would solve the problem without changing Profile Manager's baisc behaviour -
I know that it not creating subfolders for a profile (away from the defualt
location) was an intentional feature, though I forget why.

Comment 13

14 years ago
(In reply to comment #11)
See also bug 234680, comment 20, "Uninstall should give the option to remove
profile data".  It was pointed out that allowing user to select which data to
remove would automatically protect user files by removing only targeted profile
files.

Updated

14 years ago
No longer blocks: 305551

Updated

14 years ago
No longer blocks: 302087
You need to log in before you can comment on or make changes to this bug.