Opened 13 years ago

Closed 6 years ago

#2442 closed bug (fixed)

[Tracker]: it should not be possible to create a directory in /

Reported by: emitrax Owned by: waddlesplash
Priority: normal Milestone: R1
Component: Applications/Tracker Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Create a directory in the root directory, either with mkdir or tracker.

mkdir /Data

The directory will be created, but at reboot it won't be there, while with tracker you can't even name the directory.

Change History (13)

comment:1 by emitrax, 13 years ago

e.g. an error should be returned, instead of letting the user create it.

comment:2 by mmlr, 13 years ago

Not really, as that would prevent you to mount from the command line for example. It would prevent a sequence like:

mkdir /SomeVolume
mount -t bfs /path/to/image /SomeVolume

But this is perfectly valid. That the directory doesn't persist isn't really a problem. It is kinda to be expected, as there is no device associated that would store such a directory.

comment:3 by axeld, 13 years ago

Resolution: invalid
Status: newclosed

Just because it's a file system, it doesn't have to be persistent.

comment:4 by emitrax, 13 years ago

Component: File Systems/BFSApplications/Tracker
Resolution: invalid
Status: closedreopened
Summary: Issue when creating a directory in /[Tracker]: unable to name a directory in /

I don't understand though how an user is supposed to know that its data won't be there on reboot? Shouldn't be there a warning or something?

Anyway, there is an inconsistency between the mkdir command and the New Directory from the tracker. The latest doesn't allow you to name the directory, which makes it a bug if mkdir does it, even though it's only temporarely.

Another issue IMHO is encountered when going to the /boot directory with tracker, and you hit Open Parent, which is the root /, it won't take you there. You have to enter the path / in the location bar manually.

comment:5 by axeld, 13 years ago

The only bug there is if Tracker lets you create a directory there in the first place. The '/' directory is supposed to be the "Disks" folder in Tracker; it doesn't make sense to be able to create any directories there.

Tracker hides the real file system structure a bit; the Desktop is supposed to be the root, as far as Tracker is concerned, there is no parent to a volume.

comment:6 by mmlr, 13 years ago

Yup, the "/" in Tracker is not really the rootfs, but a virtual directory. With regards to an error message, there is no reason to. You aren't able to create any files in there, so you can't loose any data. The only thing you can do is create directories, as that is wanted for creating mount points. Anything else will get you an "invalid argument" or a "not enough space", which is both correct, as just creating files isn't allowed and for Tracker (that does a space check first) the rootfs tells it that there simply is no space to write anything.

comment:7 by anevilyak, 13 years ago

Yeah, this is one of many inconsistencies that was introduced by the single window browse + navigator patch to OpenTracker back in the day.

comment:8 by emitrax, 13 years ago

Summary: [Tracker]: unable to name a directory in /[Tracker]: it should not be possible to create a directory in /

Ok then, creating the directory from the tracker in the root is _the_ bug, :) as not being able to go from /boot to / (disks) with Open Parent.

As for the error, I initially created a directory and a symbolic link, but I didn't check for files with actual data. Invalid Argument is actually returned, but perhaps an error like "cannot create file in temporary fs" or something like that, would be more clear for newcomers.

comment:9 by aldeck, 13 years ago

So to summarize what we should/could do:


Fix1: Disable the "new..." menu item and Command+N when in Disks. Fix2: Show an alert with "You cannot (/are not allowed to) create a folder/file here..."

Issue2: Fix "open parent" so that it works just like the Up navigator arrow.

Issue3: Dropping a file/folder in the Disks "folder" gives a "Not enough space" alert, the message could be more specific, like in Issue1/Fix2.

Right? I'd personnaly go with Fix2 for the Issue1. What do you think?

comment:10 by axeld, 13 years ago

I would do a mix: remove the "new" menu item, but show the alert when the user presses Command-N.

comment:11 by stpere, 10 years ago

The impossibility to reach / from Tracker without typing it manually was fixed in hrev43633.

comment:12 by waddlesplash, 6 years ago

Owner: changed from axeld to waddlesplash
Status: reopenedassigned
Version: R1/pre-alpha1R1/Development

comment:13 by waddlesplash, 6 years ago

Resolution: fixed
Status: assignedclosed

This was fixed somewhere in the past 3 years - there is no "New" menu item in /, and pressing Cmd+N does nothing.

Note: See TracTickets for help on using tickets.