Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Filebrowser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
docker
Filebrowser
Commits
8f7748d1
Verified
Commit
8f7748d1
authored
4 months ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Enforce file permissions
parent
1c11fec3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.sample
+3
-0
3 additions, 0 deletions
.env.sample
docker-compose.yml
+7
-1
7 additions, 1 deletion
docker-compose.yml
docker/Dockerfile
+6
-0
6 additions, 0 deletions
docker/Dockerfile
docker/entrypoint.sh
+15
-0
15 additions, 0 deletions
docker/entrypoint.sh
with
31 additions
and
1 deletion
.env.sample
+
3
−
0
View file @
8f7748d1
...
@@ -3,9 +3,12 @@ COMPOSE_FILE=docker-compose.yml:dev.yml
...
@@ -3,9 +3,12 @@ COMPOSE_FILE=docker-compose.yml:dev.yml
# For prod
# For prod
#COMPOSE_FILE=docker-compose.yml:traefik.yml
#COMPOSE_FILE=docker-compose.yml:traefik.yml
NAME=filebrowser
NAME=filebrowser
VERSION=v2
# Hostname for prod `FQDN` ex HOSTS=`files.example.org`
# Hostname for prod `FQDN` ex HOSTS=`files.example.org`
HOSTS=
HOSTS=
DEV_PORT=8080
DEV_PORT=8080
DATA_PATH=./data/files
DATA_PATH=./data/files
UID=1000
UID=1000
GID=1000
GID=1000
DEFAULT_PERMS_DIR=755
DEFAULT_PERMS_FILE=644
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
7
−
1
View file @
8f7748d1
...
@@ -2,8 +2,14 @@ version: "3"
...
@@ -2,8 +2,14 @@ version: "3"
services
:
services
:
filebrowser
:
filebrowser
:
image
:
filebrowser/filebrowser:v2
build
:
context
:
docker/
args
:
VERSION
:
user
:
"
${UID}:${GID}"
user
:
"
${UID}:${GID}"
volumes
:
volumes
:
-
./data/database.db:/database.db
-
./data/database.db:/database.db
-
${DATA_PATH}:/srv
-
${DATA_PATH}:/srv
environment
:
DEFAULT_PERMS_DIR
:
DEFAULT_PERMS_FILE
:
This diff is collapsed.
Click to expand it.
docker/Dockerfile
0 → 100644
+
6
−
0
View file @
8f7748d1
ARG
VERSION=v2
FROM
filebrowser/filebrowser:${VERSION}
COPY
entrypoint.sh /
RUN
apk add inotify-tools
ENTRYPOINT
'/entrypoint.sh'
This diff is collapsed.
Click to expand it.
docker/entrypoint.sh
0 → 100755
+
15
−
0
View file @
8f7748d1
#!/bin/sh
set_perms
()
{
inotifywait
--monitor
--recursive
--quiet
--event
create /srv
--format
"%w%f"
|
\
while
read
f
;
do
if
[
-d
"
$f
"
]
;
then
chmod
-R
$DEFAULT_PERMS_DIR
"
$f
"
else
chmod
$DEFAULT_PERMS_FILE
"
$f
"
fi
done
}
set_perms &
exec
/filebrowser
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment