[GH-ISSUE #491] Chown mount by non-root user within container #275

Closed
opened 2026-03-04 01:43:57 +03:00 by kerem · 6 comments
Owner

Originally created by @bruceharrison1984 on GitHub (Oct 28, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/491

I'm trying to install Postgres within a docker container, while use s3fs to hold the data directory.
Postgres @ Docker Hub

The docker file creates a new user with:
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres

Within the init script of the postgres container, it attempts to change the permissions of the data folder to the postgres user, which causes an error:
chmod: changing permissions of ‘/var/lib/postgresql/data’: Input/output error

Is it not possible to allow this kind of access from a container to an s3fs share? I've tried using -o uid=999 -o gid=999 -o allow_other -o mp_umask=002, but still get the same error. The only solution I can think of would be to re-roll a postgres container that runs with root access instead of a user account.

Originally created by @bruceharrison1984 on GitHub (Oct 28, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/491 I'm trying to install Postgres within a docker container, while use s3fs to hold the data directory. [Postgres @ Docker Hub](https://hub.docker.com/_/postgres/) The docker file creates a new user with: `RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres` [Within the init script of the postgres container,](https://github.com/docker-library/postgres/blob/1c0bc9d905d569fead777b9b8e3836e8af1c394c/9.5/docker-entrypoint.sh) it attempts to change the permissions of the data folder to the postgres user, which causes an error: `chmod: changing permissions of ‘/var/lib/postgresql/data’: Input/output error` Is it not possible to allow this kind of access from a container to an s3fs share? I've tried using -o uid=999 -o gid=999 -o allow_other -o mp_umask=002, but still get the same error. The only solution I can think of would be to re-roll a postgres container that runs with root access instead of a user account.
kerem closed this issue 2026-03-04 01:43:57 +03:00
Author
Owner

@tspicer commented on GitHub (Dec 13, 2016):

Did you have any luck with this?

<!-- gh-comment-id:266883200 --> @tspicer commented on GitHub (Dec 13, 2016): Did you have any luck with this?
Author
Owner

@ggtakec commented on GitHub (Jan 9, 2017):

@bruceharrison1984 I'm sorry for my late reply.
Could you get s3fs's log with "-o dbglevel"(and "-o curldbg" if you need).
We need to know what error is occurred at changing file mode, and that log helps us to slove this issue.

Thanks in advance for your assistance.

<!-- gh-comment-id:271198485 --> @ggtakec commented on GitHub (Jan 9, 2017): @bruceharrison1984 I'm sorry for my late reply. Could you get s3fs's log with "-o dbglevel"(and "-o curldbg" if you need). We need to know what error is occurred at changing file mode, and that log helps us to slove this issue. Thanks in advance for your assistance.
Author
Owner

@ggtakec commented on GitHub (Mar 30, 2019):

We kept this issue open for a long time.
We launch new version 1.86, which fixed some problem(bugs).
Please use the latest version.
I will close this, but if the problem persists, please reopen or post a new issue.

<!-- gh-comment-id:478220390 --> @ggtakec commented on GitHub (Mar 30, 2019): We kept this issue open for a long time. We launch new version 1.86, which fixed some problem(bugs). Please use the latest version. I will close this, but if the problem persists, please reopen or post a new issue.
Author
Owner

@muzzah commented on GitHub (Jan 1, 2021):

I want to reopen this as I am having the same issue right now with a mariadb container.

I have a director /mnt/mahbucket which is mounted using the following command

sudo s3fs mahbucket /mnt/mahbucket -f -d -d  -o use_path_request_style -oallow_other,uid=999 -o multipart_size=16 -o "url=https://sos-ch-dk-2.exo.io/"

When I start up the contIner for the first time it fails

universe@universe:~$ docker-compose up
Starting nc-db ... error

ERROR: for nc-db  Cannot start service nc-db: error while creating mount source path '/mnt/mahbucket/nc/db': chown /mnt/mahbucket/nc/db: input/output error

ERROR: for nc-db  Cannot start service nc-db: error while creating mount source path '/mnt/mahbucket/nc/db': chown /mnt/mahbucket/nc/db: input/output error
ERROR: Encountered errors while bringing up the project.

And the s3fs log is as follows, not the last output which is an error for a chown command that the container tries to do.

[Snipped out some other logging]

mkdir /nc 0755 umask=0022
[INF] s3fs.cpp:s3fs_mkdir(1128): [path=/nc][mode=0755]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc_$folder$]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc_$folder$][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc_%24folder%24
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc_%24folder%24
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc_$folder$] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]   s3fs.cpp:list_bucket(2596): [path=/nc]
[INF]       curl.cpp:ListBucketRequest(3446): [tpath=/nc]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]   s3fs.cpp:create_directory_object(1101): [path=/nc][mode=0755][time=1609523812][uid=0][gid=0]
[INF]       curl.cpp:PutRequest(3218): [tpath=/nc/]
[INF]       curl.cpp:PutRequest(3236): create zero byte file object.
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:PutRequest(3319): uploading... [path=/nc/][fd=-1][size=0]
[INF]       curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]       cache.cpp:DelStat(579): delete stat cache entry[path=/nc]
getattr /nc
[INF] s3fs.cpp:s3fs_getattr(876): [path=/nc]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]       cache.cpp:AddStat(371): add stat cache entry[path=/nc/]
   NODEID: 2
   unique: 16, success, outsize: 144
unique: 18, opcode: LOOKUP (1), nodeid: 2, insize: 43, pid: 3578
LOOKUP /nc/db
getattr /nc/db
[INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db/]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]   s3fs.cpp:list_bucket(2596): [path=/nc/db]
[INF]       curl.cpp:ListBucketRequest(3446): [tpath=/nc/db]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/db/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/db/] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
   unique: 18, error: -2 (No such file or directory), outsize: 16
unique: 20, opcode: MKDIR (9), nodeid: 2, insize: 51, pid: 3578
mkdir /nc/db 0755 umask=0022
[INF] s3fs.cpp:s3fs_mkdir(1128): [path=/nc/db][mode=0755]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db/]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]   s3fs.cpp:list_bucket(2596): [path=/nc/db]
[INF]       curl.cpp:ListBucketRequest(3446): [tpath=/nc/db]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/db/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/db/] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]   s3fs.cpp:create_directory_object(1101): [path=/nc/db][mode=0755][time=1609523812][uid=0][gid=0]
[INF]       curl.cpp:PutRequest(3218): [tpath=/nc/db/]
[INF]       curl.cpp:PutRequest(3236): create zero byte file object.
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:PutRequest(3319): uploading... [path=/nc/db/][fd=-1][size=0]
[INF]       curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/db/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]       cache.cpp:DelStat(579): delete stat cache entry[path=/nc/db]
getattr /nc/db
[INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db/]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2416): HTTP response code 200
[INF]       cache.cpp:AddStat(371): add stat cache entry[path=/nc/db/]
   NODEID: 3
   unique: 20, success, outsize: 144
unique: 22, opcode: SETATTR (4), nodeid: 3, insize: 128, pid: 3578
chown /nc/db 0 0
[INF] s3fs.cpp:s3fs_chown(1798): [path=/nc/db][uid=0][gid=0]
[INF]       curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$]
[INF]       curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24
[INF]       curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
[INF]     s3fs.cpp:put_headers(828): [path=/nc/db/]
[INF]       curl.cpp:PutHeadRequest(3098): [tpath=/nc/db/]
[INF]       curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/
[INF]       curl.cpp:PutHeadRequest(3185): copying... [path=/nc/db/]
[INF]       curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/db/] [] []
[INF]       curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io
[INF]       curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT
   unique: 22, error: -5 (Input/output error), outsize: 16

The second time I start the container with the same command, everything seems to work. The first few lines I get as output from s3fs is that it checks the existing directors it created with the first run and the container continues on with creating init files with no issues

unique: 36044, opcode: LOOKUP (1), nodeid: 1, insize: 43, pid: 3577
LOOKUP /nc
getattr /nc
[INF] s3fs.cpp:s3fs_getattr(876): [path=/nc]
   NODEID: 15
   unique: 36044, success, outsize: 144
unique: 36046, opcode: LOOKUP (1), nodeid: 15, insize: 43, pid: 3577
LOOKUP /nc/db
getattr /nc/db
[INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db]
   NODEID: 16
   unique: 36046, success, outsize: 144
unique: 36048, opcode: LOOKUP (1), nodeid: 16, insize: 64, pid: 22067
LOOKUP /nc/db/9ab2aa32296e.LOWER-TEST
getattr /nc/db/9ab2aa32296e.LOWER-TEST

[Logs continue]

Im having a hard time understanding why the first run fails and the second run succeeds. Any idea?

<!-- gh-comment-id:753358639 --> @muzzah commented on GitHub (Jan 1, 2021): I want to reopen this as I am having the same issue right now with a mariadb container. I have a director `/mnt/mahbucket` which is mounted using the following command ``` sudo s3fs mahbucket /mnt/mahbucket -f -d -d -o use_path_request_style -oallow_other,uid=999 -o multipart_size=16 -o "url=https://sos-ch-dk-2.exo.io/" ``` When I start up the contIner for the first time it fails ``` universe@universe:~$ docker-compose up Starting nc-db ... error ERROR: for nc-db Cannot start service nc-db: error while creating mount source path '/mnt/mahbucket/nc/db': chown /mnt/mahbucket/nc/db: input/output error ERROR: for nc-db Cannot start service nc-db: error while creating mount source path '/mnt/mahbucket/nc/db': chown /mnt/mahbucket/nc/db: input/output error ERROR: Encountered errors while bringing up the project. ``` And the s3fs log is as follows, not the last output which is an error for a chown command that the container tries to do. ``` [Snipped out some other logging] mkdir /nc 0755 umask=0022 [INF] s3fs.cpp:s3fs_mkdir(1128): [path=/nc][mode=0755] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc_$folder$] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc_$folder$][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc_%24folder%24 [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc_%24folder%24 [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc_$folder$] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] s3fs.cpp:list_bucket(2596): [path=/nc] [INF] curl.cpp:ListBucketRequest(3446): [tpath=/nc] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/ [INF] curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] s3fs.cpp:create_directory_object(1101): [path=/nc][mode=0755][time=1609523812][uid=0][gid=0] [INF] curl.cpp:PutRequest(3218): [tpath=/nc/] [INF] curl.cpp:PutRequest(3236): create zero byte file object. [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:PutRequest(3319): uploading... [path=/nc/][fd=-1][size=0] [INF] curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] cache.cpp:DelStat(579): delete stat cache entry[path=/nc] getattr /nc [INF] s3fs.cpp:s3fs_getattr(876): [path=/nc] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/ [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] cache.cpp:AddStat(371): add stat cache entry[path=/nc/] NODEID: 2 unique: 16, success, outsize: 144 unique: 18, opcode: LOOKUP (1), nodeid: 2, insize: 43, pid: 3578 LOOKUP /nc/db getattr /nc/db [INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db/] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] s3fs.cpp:list_bucket(2596): [path=/nc/db] [INF] curl.cpp:ListBucketRequest(3446): [tpath=/nc/db] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/db/ [INF] curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/db/] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 unique: 18, error: -2 (No such file or directory), outsize: 16 unique: 20, opcode: MKDIR (9), nodeid: 2, insize: 51, pid: 3578 mkdir /nc/db 0755 umask=0022 [INF] s3fs.cpp:s3fs_mkdir(1128): [path=/nc/db][mode=0755] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db/] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] s3fs.cpp:list_bucket(2596): [path=/nc/db] [INF] curl.cpp:ListBucketRequest(3446): [tpath=/nc/db] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket?delimiter=/&max-keys=2&prefix=nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/?delimiter=/&max-keys=2&prefix=nc/db/ [INF] curl.cpp:insertV4Headers(2753): computing signature [GET] [/] [delimiter=/&max-keys=2&prefix=nc/db/] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] s3fs.cpp:create_directory_object(1101): [path=/nc/db][mode=0755][time=1609523812][uid=0][gid=0] [INF] curl.cpp:PutRequest(3218): [tpath=/nc/db/] [INF] curl.cpp:PutRequest(3236): create zero byte file object. [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:PutRequest(3319): uploading... [path=/nc/db/][fd=-1][size=0] [INF] curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/db/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] cache.cpp:DelStat(579): delete stat cache entry[path=/nc/db] getattr /nc/db [INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db/] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db/][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2416): HTTP response code 200 [INF] cache.cpp:AddStat(371): add stat cache entry[path=/nc/db/] NODEID: 3 unique: 20, success, outsize: 144 unique: 22, opcode: SETATTR (4), nodeid: 3, insize: 128, pid: 3578 chown /nc/db 0 0 [INF] s3fs.cpp:s3fs_chown(1798): [path=/nc/db][uid=0][gid=0] [INF] curl.cpp:HeadRequest(3049): [tpath=/nc/db_$folder$] [INF] curl.cpp:PreHeadRequest(3009): [tpath=/nc/db_$folder$][bpath=][save=][sseckeypos=-1] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db_%24folder%24 [INF] curl.cpp:insertV4Headers(2753): computing signature [HEAD] [/nc/db_$folder$] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT [INF] s3fs.cpp:put_headers(828): [path=/nc/db/] [INF] curl.cpp:PutHeadRequest(3098): [tpath=/nc/db/] [INF] curl.cpp:prepare_url(4703): URL is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:prepare_url(4736): URL changed is https://sos-ch-dk-2.exo.io/mahbucket/nc/db/ [INF] curl.cpp:PutHeadRequest(3185): copying... [path=/nc/db/] [INF] curl.cpp:insertV4Headers(2753): computing signature [PUT] [/nc/db/] [] [] [INF] curl.cpp:url_to_host(99): url is https://sos-ch-dk-2.exo.io [INF] curl.cpp:RequestPerform(2441): HTTP response code 404 was returned, returning ENOENT unique: 22, error: -5 (Input/output error), outsize: 16 ``` The second time I start the container with the same command, everything seems to work. The first few lines I get as output from s3fs is that it checks the existing directors it created with the first run and the container continues on with creating init files with no issues ``` unique: 36044, opcode: LOOKUP (1), nodeid: 1, insize: 43, pid: 3577 LOOKUP /nc getattr /nc [INF] s3fs.cpp:s3fs_getattr(876): [path=/nc] NODEID: 15 unique: 36044, success, outsize: 144 unique: 36046, opcode: LOOKUP (1), nodeid: 15, insize: 43, pid: 3577 LOOKUP /nc/db getattr /nc/db [INF] s3fs.cpp:s3fs_getattr(876): [path=/nc/db] NODEID: 16 unique: 36046, success, outsize: 144 unique: 36048, opcode: LOOKUP (1), nodeid: 16, insize: 64, pid: 22067 LOOKUP /nc/db/9ab2aa32296e.LOWER-TEST getattr /nc/db/9ab2aa32296e.LOWER-TEST [Logs continue] ``` Im having a hard time understanding why the first run fails and the second run succeeds. Any idea?
Author
Owner

@muzzah commented on GitHub (Jan 1, 2021):

@ggtakec Just to also add, the -ouid=999 is the userId for the user the mariadb container creates internally. Without this the directory is mounted as root and the mariadb fails to start at all with a similar chown problem

<!-- gh-comment-id:753358715 --> @muzzah commented on GitHub (Jan 1, 2021): @ggtakec Just to also add, the -ouid=999 is the userId for the user the mariadb container creates internally. Without this the directory is mounted as root and the mariadb fails to start at all with a similar chown problem
Author
Owner

@muzzah commented on GitHub (Jan 1, 2021):

Ended up creating a separate issue #1510 with more information about my setup and config

<!-- gh-comment-id:753360340 --> @muzzah commented on GitHub (Jan 1, 2021): Ended up creating a separate issue #1510 with more information about my setup and config
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#275
No description provided.