Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10671 (closed)

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

RFE: Rules for permitting or rewriting file paths

Reported by: mtbcarroll Owned by: mtbcarroll
Priority: blocker Milestone: 5.0.0-beta1
Component: OmeroFs Version: n.a.
Keywords: FS Cc: fs@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: FS demo 4.1

Description

MakePathComponentSafe includes various rules to make file paths even comfortably manipulated from shells on Windows machines. mlinkert suspects that, at the least, prohibiting spaces and periods on the end of filenames (at present, appending an underscore) is a problem.

Perhaps the server should be much less conservative in what filenames it accepts. For instance, regardless of the Windows shell, perhaps from Java the system can be more permissive. On a Unix system with a fairly Unixy filesystem then the server can be permissive indeed, at the cost of making later migration to Windows difficult.

The interaction with clients is another issue: it would be good if clients didn't have to have a bunch of special-casing depending on server configuration.

(All this becomes much easier under Java 7.)

So, what should be done? At least, if server restrictions are to be loosened, we need to reexamine the current restrictions: from where did they come, and to what extent could the server detect them as problems on the current system? And, arising from that, perhaps the sysadmin could configure how loosely they wish the server to behave.

Change History (8)

comment:1 Changed 11 years ago by jamoore

  • Milestone changed from Unscheduled to OMERO-5
  • Owner changed from jamoore to mtbcarroll
  • Priority changed from minor to blocker
  • Sprint set to FS Demo 4

comment:2 Changed 11 years ago by mtbcarroll

mlinkert had mentioned that, especially, not being able to end filenames with spaces or periods is a problem; this conflicts awkwardly with the advice at http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx viz.,

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

This suggests two levels of problem that are probably worth distinguishing in the code: what won't work at all on Windows, versus what will probably work from Java but might make things a bit tricky for the sysadmin.

comment:3 Changed 11 years ago by mtbcarroll

  • Status changed from new to accepted

comment:4 Changed 11 years ago by mtbcarroll

  • Sprint changed from FS Demo 4.x to FS demo 4.1

comment:5 Changed 11 years ago by mtbcarroll

https://github.com/openmicroscopy/openmicroscopy/pull/1109 should largely fix this, except for the question of what's needed from the UI side. FilePathNamingException contains enough information for a client to explain to the user what the problem is; once this UI element exists in clients, perhaps the path sanitization occurring in the code around ImportLibrary.createImport should be wholly elided.

comment:6 Changed 11 years ago by jamoore

Mark: happy to omit the sanitization in my importSets PR if you'd like. If so, feel free to close this ticket.

comment:7 Changed 11 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from accepted to closed

@jamoore: yes, thanks, sounds good to me, any questions I'll be glad to help.

comment:8 Changed 11 years ago by Josh Moore <josh@…>

  • Remaining Time set to 0

(In [301b4f70319aa9df8f916a5190ee058a2c7ad6d7/ome.git] on branch develop) Merge pull request #1109 from mtbc/trac-10671

fix #10671: make server handling of odd file paths more configurable

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68808 sec.)

We're Hiring!