Files - edmozley/freeitsm GitHub Wiki
Somewhere to keep files and folders that need to reach particular people, with a record of everything that happens to them. An installer too big to email, a contract only finance should see, a policy you need to prove somebody opened - they go in Files, and Files says who looked at them, when, and from where.
It looks and works like a Windows desktop on purpose: everybody already knows how to use one. For how it is built, see the Files developer guide; for the phone layout, Mobile: Files.
| 🔒 Private until shared | Nothing is visible to anybody until it has been shared with them. There is no "everyone" setting, and administrators are not let in automatically. |
| 🖥️ A desktop | Desktop icons, windows you can drag, resize and snap, a taskbar with live previews, and a start menu. |
| 📁 Documents | A file manager with a folder tree, Icons and Details views, a filter box, right-click menus, cut, copy and paste, and drag and drop. |
| ⬆️ Any size | Files go up in pieces, so a multi-gigabyte installer is fine. Every version is kept, with its SHA-256 fingerprint. |
| 👁️ Open without downloading | PDFs, Word documents, spreadsheets, images, video, audio, text - and zip files, browsed like a folder. |
| 🖋️ View only and watermarks | Let someone read a file without taking a copy, and stamp their name, the time and their IP address across it. |
| 🧾 Everything audited | Opening a folder, viewing, downloading, uploading, renaming, moving, deleting, permission changes, and every refusal. |
Files opens as a desktop. Double-click an icon to open it:
- Documents - the file manager (see below).
- Recent - files you have opened, downloaded or uploaded lately.
- Search - finds files and folders by name, anywhere you have access. It searches names, not what is inside the files.
- Help - the guide, in a window of its own.
- Settings - only if you have one of the Files settings permissions (see Settings). It opens the settings page rather than a window.
Windows move by their title bar and resize from any edge or corner. They behave the way Windows does:
- Drag a window to the top of the screen to maximise it, or to the left or right edge to fill that half of the screen. An outline shows where it will go before you let go.
- Drag a maximised or half-screen window away and it goes back to its normal size under the pointer.
- Double-click the title bar to maximise or restore.
- Each kind of window remembers its size and position for you, so Documents opens where you left it next time.
Every open window has a button on the taskbar. Click it to bring the window to the front, click again to minimise it. Hover over a button to see a live preview of the window - including what a PDF or video in it is showing - and click the preview to bring it back. Right-click a taskbar button for Minimise, Maximise and Close window.
While files are uploading, the taskbar shows how many are still going, and clicking it opens the Transfers window. The clock sits on the right.
The button at the bottom left (or Ctrl+Esc) opens the start menu: every app, your Recent files, a search box, All modules (the rest of FreeITSM), and Sign out. If you hide the top bar, this is how you get around.
Right-click the desktop and choose Personalise (it is in the start menu too). Two choices, and they are yours alone:
- Desktop colour - a swatch, or Choose any colour.
- Top navigation bar - Always show, Show when the mouse reaches the top, or Hide - use the start menu instead.
The logo in the corner of the desktop is not a personal choice: an administrator sets it under System -> Branding (see Settings).
The Documents window shows your folders on the left and the open folder on the right.
- Icons and Details - switch with the buttons on the right of the toolbar. In Details, click a column heading to sort by it. Files remembers which view you like.
- Filter this folder - type in the box at the top right (or press Ctrl+F) to narrow the open folder down to names containing what you typed. Every window has its own.
- Back, Forward, Up and Refresh work as in Windows, and so do Backspace, Alt+Left, Alt+Right and Alt+Up.
- Selecting - click to select, Ctrl+click to add to the selection, Shift+click for a range, Ctrl+A for everything, or drag a box around several things starting from empty space.
- Right-click anything for what you can do with it: Open, Open in new window, Download, Cut, Copy, Paste into folder, Create shortcut, Rename, Delete, Permissions and Properties. Things you are not allowed to do are greyed out.
- Cut, Copy and Paste - Ctrl+X, Ctrl+C and Ctrl+V. F2 renames, Delete deletes, F5 refreshes. Clicking the name of something already selected renames it in place, as it does in Windows.
- Properties shows a folder's size and contents, or a file's details and every version of it, each with its SHA-256 fingerprint and buttons to open or download that version.
"Documents" at the top is not the real top of the tree: it shows every folder that has been shared with you. If you were given a folder deep inside someone else's, it appears there on its own with its full path as a hint - you never see the folders above it.
Files always go inside a folder. Only folders can sit at the top.
Deleted files and folders are kept rather than destroyed: they are marked as deleted and disappear from every list, and the deletion is recorded in the audit trail. The stored copy stays on the server. There is no screen to restore them yet - see Not built yet.
Drag files from your computer into a folder window (or onto a folder in it, the folder tree or the address bar), or use Upload on the toolbar.
- Size. Files go up in 4 MB pieces, two files at a time, so the server's own PHP upload limits do not apply. The only limit is Largest upload in Files -> Settings -> Storage, 4096 MB (4 GB) unless an administrator changes it.
- Progress. The Transfers window shows each upload, and any of them can be cancelled. Closing the browser tab while something is uploading asks you first.
- The same name. If the folder already has a file with that name you choose Replace (the upload becomes a new version and the old one is kept), Keep both (the new one gets a number, like "Report (2).pdf") or Skip. With several files going up you can tick Do this for every clash in this upload.
- Versions. Every version is kept with its SHA-256 fingerprint, shown in Properties, so you can prove the copy someone has is the one that was uploaded.
A dropped connection stops that upload with "The connection dropped." - start it again. Downloads are different: a download that drops can resume where it stopped.
Dropping a file on the desktop itself does nothing but tell you to drop it into a folder window - the desktop is not a folder.
Double-click a file to open it in a viewer window, without downloading it.
| Kind | How it is shown |
|---|---|
| Mozilla's pdf.js, page by page. A long manual opens at page one straight away, because only the pages you look at are fetched. | |
| Word (.docx) | A simplified page - the text, headings, lists, tables and pictures. Layout, fonts and page breaks may differ from Word, and the viewer says so. Older .doc files have no preview. |
| Spreadsheets (.xlsx, .xlsm, .xls, .ods, .csv) | A grid with a tab for each sheet, up to 5,000 rows and 200 columns; beyond that it tells you to download the file. |
| Images (PNG, JPG, GIF, WebP, BMP) | As themselves, with zoom. |
| Video and audio (MP4, WebM, MOV, MP3, WAV, FLAC and similar) | The browser's own player. Whether a format plays depends on the browser. |
| Text and code (.txt, .log, .json, .ps1, .sql, .pem and many more) | As plain text, never run. |
| Zip files | Browsed like a folder - see below. |
| Anything else | Its icon, name and size, and a Download button if you are allowed to download it. |
PDFs, Word documents and images have Zoom in, Zoom out and Fit to width. Fit to width measures the window when you press it and keeps fitting while you resize the window.
A zip opens as a list of the files and folders inside it. Click into the folders, and open any file in the same viewer - including another zip inside the zip. Back to returns you to the list.
The zip is unpacked in your own browser, so nothing is extracted on the server. Opening or downloading something inside a zip is still recorded in the audit trail, with the name of the file inside it.
Someone with View but not Download on a folder can open its files, but:
- there is no Download button, and the viewer shows View only;
- they cannot right-click or select the contents, and video and audio offer no download;
- printing the page prints a blank page;
- the file's bytes come through a short-lived link that works only in their own signed-in browser, for that one file, for four hours, and stops working the moment their access is taken away.
Each folder can also turn on a watermark: right-click the folder, Permissions, then Watermark. Every file opened from that folder - and the folders inside it - then shows the viewer's name, the date and time, and their IP address across the page, so a screenshot shows who took it. A folder follows its parent folder unless it is set otherwise, and nothing is watermarked unless somebody turns it on.
Important
This is a deterrent, not a lock. Anything a browser can show can be photographed or captured, and a determined person with View access can always get a copy of what they are looking at. View only and the watermark make leaking deliberate and traceable, not impossible. If someone must not have a document, do not give them View.
Permissions are set on folders. A file always has the permissions of the folder it is in. Right-click a folder and choose Permissions.
There are five levels, and each includes the ones before it:
| Level | Lets them |
|---|---|
| View | see the folder and open its files in the viewer |
| Download | also take a copy - download, and copy files elsewhere in Files |
| Upload | also add files and subfolders, and upload new versions |
| Modify | also rename, move and delete |
| Full control | also change the permissions, the inheritance and the watermark |
- People and teams. Add a person or a team in the Permissions window. Somebody who is in two teams with different levels gets the higher one.
- Hidden means not found. A folder you have no access to does not exist for you - not in Documents, not in Search, not in your recent files, and not as a "this name is taken" message. Asking for it by its number gets "not found", never "access denied".
- No Deny. Access is only ever granted. To keep someone out of a subfolder, stop it inheriting (see below).
- Administrators are not special. Being a FreeITSM administrator does not let you into a folder. The way in for someone who needs it is Take ownership, which is recorded.
- Top-level folders. Creating a folder at the top level is itself a permission - the Folders tab of Files in System -> Roles. Whoever creates a top-level folder gets Full control of it automatically, so they are not locked out of what they just made. A new top-level folder is shared with nobody else until they add people to it.
- Your own Full control. If you remove your own Full control, Files warns you first: unless you have it some other way, you will not be able to change the permissions again.
The person also needs the Files module itself (System -> Modules). A grant to someone without the module does nothing until they are given it.
A new folder includes the permissions of the folder it is in, and of that folder's parent, all the way up. In the Permissions window, inherited entries are shown with the folder they come from - change them on that folder.
Untick Include permissions from the parent folder to stop a folder inheriting. Files asks what should happen to the permissions it inherited:
- Copy - they become the folder's own entries, a starting point you can then trim.
- Remove - only the folder's own entries are left.
Moving a folder that inherits changes what it inherits: it now gets its new parent's permissions. The move is recorded in the audit trail with a note that the folder inherits.
Copies always inherit from where they land, and copying never brings along anything you could not download yourself - a subfolder you cannot reach is simply left out of the copy.
Right-click a file or folder and choose Create shortcut:
- In this folder - beside the original, for everyone who can open that folder. You need Upload there. A top-level folder has nowhere beside it, so its shortcut can only go on your desktop.
- On desktop - on your own desktop. Nobody else sees it.
A shortcut opens what it points to, but gives nobody access. Opening it goes through the original's own permissions, and someone who cannot see the original never sees a shortcut to it in a folder either. If the original is deleted or stops being shared with you, a desktop shortcut stays but is greyed out and says so when opened.
Right-click a shortcut for Open file location, Rename, Delete and Properties. Deleting a shortcut leaves the original alone.
Drag works between any windows, the folder tree, the address bar and the desktop:
- Onto a folder - files, folders and shortcuts move there. Hold Ctrl to copy instead. Moving needs Modify on what you move; copying needs Download; either needs Upload on the folder they land in.
- Onto the desktop - nothing is stored on the desktop itself, so a file or folder dropped there becomes a desktop shortcut to it. A shortcut dragged from a folder moves to your desktop, or with Ctrl is copied there and stays in the folder too.
- A desktop shortcut into a folder moves it into that folder, where everyone who can open the folder (and see its target) will see it.
- Files from your computer dropped on a folder window upload into it.
If some of what you dragged cannot go where you dropped it, the rest still goes and you are told which ones failed and why.
Files records every action, and nothing is collapsed - every view is its own record:
- opening a folder, looking at a file's or folder's Properties, and every search with what was searched for;
- viewing a file (which version, whether it was watermarked, and whether the person could download), and opening anything inside a zip;
- downloading (which version - a resumed download counts once);
- uploading and new versions (with the size and SHA-256);
- creating, renaming, moving and copying folders and files, and deleting them;
- shortcuts being created, moved, copied, renamed and deleted;
- permission changes (each person or team added, changed or removed), inheritance changes and watermark changes;
- taking ownership, and changes to the Storage settings;
- every refusal - someone trying to do something their level does not allow.
Each record keeps the person's name, the path of the file or folder, the time, their IP address and their browser, as they were at the time - so the trail still reads correctly after a file is renamed or deleted, or a person leaves.
Note
There is no screen for reading the trail yet. An Audit app on the desktop is planned; until then the records are in the files_audit table in the database.
Because nothing is visible by default, a folder can end up with nobody able to open it - the only person with Full control left the organisation, for example.
Files -> Settings -> Folders lists every folder that exists, including the ones you cannot open. You see names, paths and counts there, never files. A folder with no entries of its own and nothing to inherit (a top-level folder, or one that stopped inheriting) is marked nobody has access. Take ownership gives you Full control of a folder after you confirm; you can then open it and share it again.
Taking ownership is a permission of its own (the Folders tab of Files in System -> Roles - the same one that lets someone create top-level folders), and every use of it is recorded in the audit trail with your name.
Files -> Settings has two tabs, each its own permission in System -> Roles:
- Folders - every folder, and Take ownership (above).
- Storage - where files are kept on the server, and the Largest upload.
Files are stored on the server as yyyy/mm/dd/<random>.bin, named by the day they were uploaded. The real names are only in the database, so nothing uploaded can ever be run by the web server, and the folder is never served to a browser - every file goes through FreeITSM's own permission check.
- The default Storage folder is
uploads/files/inside FreeITSM. On Docker it is thefilesvolume, so it survives updates. Somewhere outside the web root is better still. - The tab shows where files are now, how many are stored, how much space they use and how much is free on that disk, and warns if the web server cannot write there.
-
Changing the storage folder does not move anything. Copy everything from the old folder into the new one first, keeping the
yyyy/mm/ddfolders as they are, then save - otherwise existing files will be missing.
System -> Branding -> Files desktop decides, for everyone, whether the desktop shows a logo (Logo: the company logo of the person signed in, or No logo) and in which corner (Position: Top right or Bottom right).
The logo is the logo of the company the person is working in, set under System -> Companies - open an existing company and use Choose under Logo (PNG, JPG, GIF or WebP, up to 2 MB; it is saved straight away). A company without one shows the organisation logo from System -> Branding instead.
There is no desktop on a phone - windows and a taskbar are no way to manage files on a small screen. Files shows a plain list of the same folders instead: tap a folder to open it, the arrow to go back, and a file to open it full screen in the same viewer, with the same View only rules and watermark. You can upload and create folders from the phone wherever you have permission to.
Recent, Search, shortcuts on your desktop, permissions, renaming and deleting are on the desktop only. See Mobile: Files.
So nobody is surprised:
- Share links for people outside FreeITSM. Everything in Files is for signed-in analysts.
-
An Audit app for reading the trail. The records are kept from day one, in
files_audit. - A recycle bin you can restore from. Deleted items are kept, but there is no screen to bring them back, and nothing deletes their stored copies from the server.
- Quotas. There is a largest upload, but no limit on how much a folder or a person can store.
- Searching inside files. Search looks at names only.
- Translations. Files is in English in every language for now.
See also: Files - Developer Guide · Mobile: Files · Roles and Permissions · Module Access Control · Running on nginx