Giter VIP home page Giter VIP logo

filebrowser's Introduction

Build Status PHP master Build Status Node master License

https://filebrowser.linuxforphp.net

FileBrowser - Powerful Multi-User File Manager

FileBrowser is a free, open-source, self-hosted web application for managing files and folders.

You can manage files inside your local repository folder (on your server's hard drive) or connect to other storage adapters (see below).

FileBrowser has multi-user support, so you can have administrators and other users managing their files with different access permissions, roles and home folders.

All basic file operations are supported: copy, move, rename, edit, create, delete, preview, zip, unzip, download, upload.

If allowed, users can download multiple files or folders at once.

File upload supports drag&drop, progress bar, pause and resume. Upload is chunked so you should be able to upload large files regardless of your server configuration.

Typical Use Cases

  • Share a folder with colleagues, your team, friends or family,
  • Give students access to upload their work,
  • Allow workers to upload field data / docs / images,
  • Use as cloud backup,
  • Manage cdn with multiple people,
  • Use as ftp/sftp replacement,
  • Manage s3 or other 3rd party cloud storage,
  • Use to quickly zip and download remote files.

Documentation

Check out the documentation here:

https://filebrowser.linuxforphp.net/documentation

Features & Goals

  • Multiple storage adapters (Local, FTP, Amazon S3, Dropbox, DO Spaces, Azure Blob and many others via Flysystem),
  • Multiple authentication adapters with roles and permissions (store users in a json file, database, or use WordPress),
  • Multiple session adapters (native file, Pdo, Redis, MongoDB, Memcached, and others via Symfony),
  • Single page front-end (built with Vue.js, Bulma and Buefy),
  • Chunked uploads (built with Resumable.js),
  • Zip and bulk download support,
  • Highly extensible, decoupled and tested code,
  • No database required.

Minimum Requirements

  • FileBrowser 8.1.0: PHP 8.0 - 8.2 (with php-zip extension)
  • FileBrowser 8.0.3: PHP 7.2 - 7.4 (with php-zip extension)

Download Pre-Compiled Builds

Pre-compiled builds are created for non-developers. With this version of the FileBrowser, the front end code (HTML, CSS and Javascript) is already pre-compiled for you, and the source code is removed, so that the final archive file contains only what is required to run the application on your server.

  • Download the latest release,
  • Unzip the files, and upload them to your PHP server,
  • Make sure your web server can read and write to the filebrowser/repository/ and filebrowser/private/ folders,
  • Set the website document root to the filebrowser/dist/ directory (this is also known as ‘public’ folder),
  • Visit the web page, and if something goes wrong, please check filebrowser/private/logs/app.log,
  • Login with default credentials admin/admin123,
  • Change default admin’s password.

NOTE: For security reasons, the /dist folder is the ONLY folder you want to be exposed to the Web. Everything else should be outside of your web root, this way people can’t access any of your important files through the Web browser.

Project Setup for Development (Linux)

You must have git, php, npm, and composer installed.

If you have Docker and Linux for Composer (https://github.com/linuxforphp/linuxforcomposer) on your computer, you can start the container with the following command:

git clone https://github.com/linuxforphp/filebrowser.git
cd filebrowser
composer install --ignore-platform-reqs
vendor/bin/linuxforcomposer docker:run start

When you are ready to stop the container, enter the following command:

vendor/bin/linuxforcomposer docker:run stop-force

Otherwise, you can install the application manually, using the following commands:

git clone https://github.com/linuxforphp/filebrowser.git
cd filebrowser
cp configuration_sample.php configuration.php
chmod -R 775 private/
chmod -R 775 repository/
composer install --ignore-platform-reqs
npm install
npm run build

Compiles and Hot Reloads

The following command will launch the back end and the front end of the application on ports 8081 and 8080 respectively:

npm run serve

Once everything is ready visit: http://localhost:8080

Run Tests & Static Analysis

Testing requires xdebug, php-zip and sqlite php extensions.

vendor/bin/phpunit
vendor/bin/phpstan analyse ./backend
npm run lint
npm run e2e

Deployment

Set the website document root to the /dist directory. This is also known as the ‘public’ folder.

NOTE: For security reasons, the /dist folder is the ONLY folder you want to be exposed to the Web. Everything else should be outside of your web root. This way, people won't be able to access any of your important files through the Web browser.

Security

If you discover any security related issues, please email us at [email protected] instead of using the issue tracker.

License

Copyright 2021-2023 LfPHP Services. Copyright 2019 Milos Stojanovic. MIT License.

This project is licensed under the Terms of the Apache 2.0 license.

filebrowser's People

Contributors

abelcastosa avatar adi82bdg avatar ahaenggli avatar alcalbg avatar andrewscaya avatar anxodobosque avatar bagriydmitriy avatar dependabot[bot] avatar devteam21 avatar drerfinder avatar gallisiardi avatar gui13 avatar jeancarlos-cpu avatar jinhee-kim avatar karzac avatar khsmty avatar lzkill avatar nesetdemir avatar pauloklaus avatar peter279k avatar peterr-k avatar tobiasgruber1995 avatar vagra avatar vaidas777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

filebrowser's Issues

Bug report

Describe the bug
Unable to upload any file

To Reproduce
Steps to reproduce the behavior:

  1. create a Dockerfile with the following content:

FROM ubuntu

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y wget zip unzip php apache2 libapache2-mod-php php-zip

WORKDIR /var/www/
RUN wget https://filebrowser.linuxforphp.net/files/filebrowser-8.0.2.zip
RUN unzip filebrowser-8.0.2.zip && rm filebrowser-8.0.2.zip

RUN chown -R www-data:www-data filebrowser/
RUN chmod -R 775 filebrowser/

RUN echo "
<VirtualHost *:80>\n
DocumentRoot /var/www/filebrowser/dist\n
\n
" >> /etc/apache2/sites-available/filebrowser.conf

RUN a2dissite 000-default.conf
RUN a2ensite filebrowser.conf

CMD service apache2 restart
&& tail -f /dev/null

  1. Build the docker image with:

docker build -t my-php-app .

  1. Run the image with:

docker run -it --rm --name my-running-app -p 4000:80 my-php-app

  1. With a browser, access the file browser at: http://localhost:4000, username: admin; password: admin123
  2. Click on "Add files" and try to upload a file
  3. A red line appears on the bottom, and no file is uploaded
    image
  4. looking at the log file inside the container, the following error is reported:

[2022-05-23 06:56:10] default.ALERT: Fatal Error (E_ERROR): Uncaught Error: Call to a member function isValid() on array in /var/www/filebrowser/backend/Controllers/UploadController.php:71 Stack trace: #0 [internal function]: Filebrowser\Controllers\UploadController->upload() #1 /var/www/filebrowser/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array() #2 /var/www/filebrowser/vendor/php-di/php-di/src/Container.php(276): Invoker\Invoker->call() #3 /var/www/filebrowser/backend/Services/Router/Router.php(81): DI\Container->call() #4 /var/www/filebrowser/backend/App.php(34): Filebrowser\Services\Router\Router->init() #5 /var/www/filebrowser/dist/index.php(95): Filebrowser\App->__construct() #6 {main} thrown {"code":1,"message":"Uncaught Error: Call to a member function isValid() on array in /var/www/filebrowser/backend/Controllers/UploadController.php:71\nStack trace:\n#0 [internal function]: Filebrowser\Controllers\UploadController->upload()\n#1 /var/www/filebrowser/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array()\n#2 /var/www/filebrowser/vendor/php-di/php-di/src/Container.php(276): Invoker\Invoker->call()\n#3 /var/www/filebrowser/backend/Services/Router/Router.php(81): DI\Container->call()\n#4 /var/www/filebrowser/backend/App.php(34): Filebrowser\Services\Router\Router->init()\n#5 /var/www/filebrowser/dist/index.php(95): Filebrowser\App->__construct()\n#6 {main}\n thrown","file":"/var/www/filebrowser/backend/Controllers/UploadController.php","line":71,"trace":null} []

Expected behavior
Selected file should be uploaded.

Screenshots
See above.

Logs
excerpted from container's file /private/logs/app.log:

[2022-05-23 06:56:10] default.ALERT: Fatal Error (E_ERROR): Uncaught Error: Call to a member function isValid() on array in /var/www/filebrowser/backend/Controllers/UploadController.php:71 Stack trace: #0 [internal function]: Filebrowser\Controllers\UploadController->upload() #1 /var/www/filebrowser/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array() #2 /var/www/filebrowser/vendor/php-di/php-di/src/Container.php(276): Invoker\Invoker->call() #3 /var/www/filebrowser/backend/Services/Router/Router.php(81): DI\Container->call() #4 /var/www/filebrowser/backend/App.php(34): Filebrowser\Services\Router\Router->init() #5 /var/www/filebrowser/dist/index.php(95): Filebrowser\App->__construct() #6 {main} thrown {"code":1,"message":"Uncaught Error: Call to a member function isValid() on array in /var/www/filebrowser/backend/Controllers/UploadController.php:71\nStack trace:\n#0 [internal function]: Filebrowser\Controllers\UploadController->upload()\n#1 /var/www/filebrowser/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array()\n#2 /var/www/filebrowser/vendor/php-di/php-di/src/Container.php(276): Invoker\Invoker->call()\n#3 /var/www/filebrowser/backend/Services/Router/Router.php(81): DI\Container->call()\n#4 /var/www/filebrowser/backend/App.php(34): Filebrowser\Services\Router\Router->init()\n#5 /var/www/filebrowser/dist/index.php(95): Filebrowser\App->__construct()\n#6 {main}\n thrown","file":"/var/www/filebrowser/backend/Controllers/UploadController.php","line":71,"trace":null} []

Environment (please complete the following information):

  • FileBrowser Version 8.0.2
  • Server: Ubuntu 22.04
  • PHP Version PHP 8.1.2 (cli) (built: Apr 7 2022 17:46:26) (NTS)
  • Browser Chrome

Login logs

Hello,
I have been using filebrowser without trouble for a few weeks now, and everything works great, but I don't know where/how to find the logins logs.
Are they disabled by default ? Since there is no login event yet, I wanted to read the logs so that if someone connects I can execute custom commands.
How should I proceed ?

Can't run project setup for development

I can't start the project setup for development. If I run
npm run serve
I receive
#######
sudo npm run serve

[email protected] serve
concurrently "php -S localhost:8081" "vue-cli-service serve"

[0] [Mon Jul 29 17:28:12 2024] PHP 8.2.20 Development Server (http://localhost:8081) started
[1] INFO Starting development server...
[1] ERROR ValidationError: Progress Plugin Invalid Options
[1]
[1] options should NOT have additional properties
[1] options should NOT have additional properties
[1] options should NOT have additional properties
[1] options should pass "instanceof" keyword validation
[1] options should match exactly one schema in oneOf
[1]
[1] ValidationError: Progress Plugin Invalid Options
[1]
[1] options should NOT have additional properties
[1] options should NOT have additional properties
[1] options should NOT have additional properties
[1] options should pass "instanceof" keyword validation
[1] options should match exactly one schema in oneOf
[1]
[1] at validateOptions (/opt/fb_container/filebrowser/node_modules/webpack/node_modules/schema-utils/src/validateOptions.js:32:11)
[1] at new ProgressPlugin (/opt/fb_container/filebrowser/node_modules/webpack/lib/ProgressPlugin.js:62:3)
[1] at new Progress (/opt/fb_container/filebrowser/node_modules/progress-webpack-plugin/index.js:25:21)
[1] at new progressPlugin (/opt/fb_container/filebrowser/node_modules/progress-webpack-plugin/index.js:127:10)
[1] at /opt/fb_container/filebrowser/node_modules/webpack-chain/src/Plugin.js:14:18
[1] at module.exports.toConfig (/opt/fb_container/filebrowser/node_modules/webpack-chain/src/Plugin.js:78:22)
[1] at /opt/fb_container/filebrowser/node_modules/webpack-chain/src/Config.js:129:63
[1] at Array.map ()
[1] at module.exports.toConfig (/opt/fb_container/filebrowser/node_modules/webpack-chain/src/Config.js:129:40)
[1] at Service.resolveWebpackConfig (/opt/fb_container/filebrowser/node_modules/@vue/cli-service/lib/Service.js:277:34)
[1] at PluginAPI.resolveWebpackConfig (/opt/fb_container/filebrowser/node_modules/@vue/cli-service/lib/PluginAPI.js:132:25)
[1] at serve (/opt/fb_container/filebrowser/node_modules/@vue/cli-service/lib/commands/serve.js:79:31)
[1] at Service.run (/opt/fb_container/filebrowser/node_modules/@vue/cli-service/lib/Service.js:262:12)
[1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[1] vue-cli-service serve exited with code 1`
#######
Is there any outdated dependency?

Upgrade to Flysystem v3

Just found this project, looks really interesting! (Currently we're stuck with elFinder)

Are you planning on upgrading to Flysystem v3 in the near future?

How to set storage path?

Hey there, I have been using the file browser cloud successfully for the last 3 months on my Raspberry Pi. Now my SD Card is out of space. So, I plugged and mounted an external SSD and put my all data in it. But now I want to the file browser cloud to point to my data stored in the SSD the mount point is - /mnt/Home_Drive
Please guide me through it. I already read the documentation thoroughly but can't figure out how to set the storage path.

Upload is broken in UploadController.php function upload

Describe the bug
When a file is chosen to be uploaded system trows the following exception and the file fails to upload:

PHP Fatal error: Uncaught Error: Call to a member function isValid() on array in /var/www/filebrowser/backend/Controllers/UploadController.php:71\nStack trace:\n#0 [internal function]: Filebrowser\Controllers\UploadController->upload()\n#1 /var/www/filebrowser/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array()\n#2 /var/www/filebrowser/vendor/php-di/php-di/src/Container.php(276): Invoker\Invoker->call()\n#3 /var/www/filebrowser/backend/Services/Router/Router.php(81): DI\Container->call()\n#4 /var/www/filebrowser/backend/App.php(34): Filebrowser\Services\Router\Router->init()\n#5 /var/www/filebrowser/dist/index.php(95): Filebrowser\App->__construct()\n#6 {main}\n thrown in /var/www/filebrowser/backend/Controllers/UploadController.php on line 71, referer: http://192.168.0.110/

It would appear in the upload function that $filename is extracted from $request->input but that is not used later on to identify the file name used to build $file. In playing with the system it appears that a forward slash is pre-pended on the file name and when isValid is called on that value,

Screen displays the filename with a pre-pended forwad slash as in "/1920x1080p24_Contrast_Main-1024x576.png" above a red bar.

isValid() fails with a file does not exist error, but I can't be sure about this. Too long since I've been playing with PHP.

Environment (please complete the following information):

  • FileBrowser Version - using filebrowser_latest pulled on 12/12/23
  • Server: Apache 2.4.57 on Debian Linux (Linux avtech 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux)
  • PHP Version PHP 8.2.7
  • Browser Chrome, also on Edge
  • Installed on a Raspberry Pi 4B (8GB) w/32GB SD Card to use as a portable SAN.

Additional context

problems with installation

Hello,
thank you for developing such a needed tool, I am sure it will help a lot of people.

I was trying to setup filebrowsr, did exactly what was mentioned in the instructions. When start apache , and type the URL of the server, I get a blank page. I am running Rocky linux 8 with apache .

Is there any specific instructions setting up apache , except the DocumentRoot ? All I did - changed the DocumentRoot to /var/www/html/filebrowser/dist

Here is what my changes are in /etc/httpd/conf.d/ssl.conf file:

DocumentRoot "/var/www/html/filebrowser/dist"
ServerName 10.240.59.66:443

I am pretty sure I am doing something wrong here, not sure what though.

thanks.

Config

How would I go about configuring the s3client to handle backblaze b2?

Bug report on documentation

Describe the bug

A wrong documentation is provided in:

/docs/installation.rst

In section Install on fresh Ubuntu 18.04 or Debian 10.3, the download address specified in the wget command is incorrect.

wget https://filebrowser.linuxforphp.com/files/filebrowser_latest.zip
unzip filebrowser_latest.zip && rm filebrowser_latest.zip

The domain seems to be .net (instead of .com) and no _latest file is available.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Follow the instructions
  3. wget reports an error

Expected behavior
wget should correctly find the resource specified

Environment (please complete the following information):

  • FileBrowser Version [e.g. 8.0.2]

Additional context
I solved the problem by manually changing the resource address and name, pointing to rev 8.0.2 explicitly.

wget https://filebrowser.linuxforphp.net/files/filebrowser-8.0.2.zip
unzip filebrowser-8.0.2.zip && rm filebrowser-8.0.2.zip

Though, no address seems to be available for a generic "latest" version package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.