Docker Permission denied 500 EACCES


#1

Hi together,

maybe somebody would be so nice and help me.

With Docker I setup an Instance and I managed to upload an Avatar or Header pic, but when I try to remote follow or post a picture I get this error:

Errno::EACCES (Permission denied @ dir_s_mkdir - /var/lib/mastodon):

2018-10-18T11:57:14.773216512Z [a888439f-c77a-4710-a064-4163ef47fe09] method=GET path=/api/v1/filters format=html controller=Api::V1::FiltersController action=index status=200 duration=6.24 view=1.14 db=1.25
2018-10-18T13:14:44.456621513Z [fc2afd7e-4624-4972-a53f-5b50673724d8]   Rendering home/index.html.haml within layouts/application
2018-10-18T13:14:44.457776340Z [fc2afd7e-4624-4972-a53f-5b50673724d8]   Rendered home/index.html.haml within layouts/application (1.2ms)
2018-10-18T13:14:44.465257169Z [fc2afd7e-4624-4972-a53f-5b50673724d8] method=GET path=/ format=html controller=HomeController action=index status=200 duration=65.64 view=6.97 db=17.59
2018-10-18T13:14:45.393278912Z [3c15857a-f20c-421c-9324-572ebcdb469e] method=GET path=/api/v1/custom_emojis format=html controller=Api::V1::CustomEmojisController action=index status=200 duration=7.79 view=1.31 db=1.92
2018-10-18T13:14:45.692846822Z [98aa7b6c-1c9b-469b-a962-f7dc0b51679d] method=GET path=/api/v1/timelines/home format=html controller=Api::V1::Timelines::HomeController action=show status=200 duration=37.69 view=6.28 db=8.50
2018-10-18T13:14:45.710851368Z [31006ad7-419e-4ece-ae37-8b2144f83258] method=GET path=/api/v1/notifications format=html controller=Api::V1::NotificationsController action=index status=200 duration=11.86 view=0.45 db=4.53
2018-10-18T13:14:45.767246241Z X-Accel-Mapping header missing
2018-10-18T13:14:45.970131020Z X-Accel-Mapping header missing
2018-10-18T13:14:46.141368153Z [75c763a4-cf7d-45c1-b532-0d71fed44539] method=GET path=/api/v1/filters format=html controller=Api::V1::FiltersController action=index status=200 duration=10.27 view=1.34 db=3.93
2018-10-18T13:14:47.167805133Z X-Accel-Mapping header missing
2018-10-18T13:14:53.467005771Z [7420baf3-063b-4250-84dd-263a0de7b957] [paperclip] Trying to link /tmp/RackMultipart20181018-14-ab4389.jpg to /tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-1s4sdtm.jpg
2018-10-18T13:14:53.468518918Z [7420baf3-063b-4250-84dd-263a0de7b957] [paperclip] Trying to link /tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-1s4sdtm.jpg to /tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-l2d3gg.jpg
2018-10-18T13:14:53.468976277Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: file -b --mime '/tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-l2d3gg.jpg'
2018-10-18T13:14:53.472383247Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: identify -format %m '/tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-1s4sdtm.jpg[0]'
2018-10-18T13:14:53.492666296Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: convert '/tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-1s4sdtm.jpg[0]' -auto-orient -resize "1280x1280>" -quality 90 -strip '/tmp/6aaa5802a4e73cc061cadccf4e14840d20181018-14-1l132iv'
2018-10-18T13:14:53.550740130Z [7420baf3-063b-4250-84dd-263a0de7b957] [paperclip] Trying to link /tmp/6aaa5802a4e73cc061cadccf4e14840d20181018-14-1l132iv to /tmp/9ce19060dc24d2709735e5d8d914e1f820181018-14-1w9swsm
2018-10-18T13:14:53.552007344Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: identify -format %m '/tmp/9ce19060dc24d2709735e5d8d914e1f820181018-14-1w9swsm[0]'
2018-10-18T13:14:53.562312253Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: convert '/tmp/9ce19060dc24d2709735e5d8d914e1f820181018-14-1w9swsm[0]' -auto-orient -resize "400x400>" -quality 90 -strip '/tmp/c21b729f9df5d50564ade7deeaedb67220181018-14-1a6yugx'
2018-10-18T13:14:53.646601677Z [7420baf3-063b-4250-84dd-263a0de7b957] [paperclip] Trying to link /tmp/c21b729f9df5d50564ade7deeaedb67220181018-14-1a6yugx to /tmp/0349279fd224f6425c518d8c77b22d0020181018-14-1my2gyk
2018-10-18T13:14:53.649260854Z [7420baf3-063b-4250-84dd-263a0de7b957] [paperclip] Trying to link /tmp/9ce19060dc24d2709735e5d8d914e1f820181018-14-1w9swsm to /tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-sv7jm2.jpg
2018-10-18T13:14:53.649563631Z [7420baf3-063b-4250-84dd-263a0de7b957] Command :: file -b --mime '/tmp/7d7b18843b34fa3a48730913dd2133c020181018-14-sv7jm2.jpg'
2018-10-18T13:14:53.656630001Z [7420baf3-063b-4250-84dd-263a0de7b957] method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=500 error='Errno::EACCES: Permission denied @ dir_s_mkdir - /var/lib/mastodon' duration=208.27 view=0.00 db=5.39
2018-10-18T13:14:53.657387675Z [7420baf3-063b-4250-84dd-263a0de7b957]
2018-10-18T13:14:53.657481117Z [7420baf3-063b-4250-84dd-263a0de7b957] Errno::EACCES (Permission denied @ dir_s_mkdir - /var/lib/mastodon):
2018-10-18T13:14:53.657516976Z [7420baf3-063b-4250-84dd-263a0de7b957]
2018-10-18T13:14:53.657600878Z [7420baf3-063b-4250-84dd-263a0de7b957] app/controllers/api/v1/media_controller.rb:13:in `create'

same here:

2018-10-17T20:52:30.402500040Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] method=GET path=/authorize_interaction format=html controller=AuthorizeInteractionsController action=show status=500 error='Errno::EACCES: Permission denied @ dir_s_mkdir - /var/lib/mastodon' duration=286.30 view=0.00 db=5.82
2018-10-17T20:52:30.403441492Z [5d68d306-76d7-4588-878f-0b8a1797fcd7]
2018-10-17T20:52:30.403453000Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] Errno::EACCES (Permission denied @ dir_s_mkdir - /var/lib/mastodon):
2018-10-17T20:52:30.403511006Z [5d68d306-76d7-4588-878f-0b8a1797fcd7]
2018-10-17T20:52:30.403601962Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/models/account.rb:280:in `save_with_optional_media!'
2018-10-17T20:52:30.403608699Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/activitypub/process_account_service.rb:63:in `update_account'
2018-10-17T20:52:30.403611887Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/activitypub/process_account_service.rb:25:in `block in call'
2018-10-17T20:52:30.403615232Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/activitypub/process_account_service.rb:18:in `call'
2018-10-17T20:52:30.403618445Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/resolve_account_service.rb:102:in `handle_activitypub'
2018-10-17T20:52:30.403621589Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/resolve_account_service.rb:48:in `block in call'
2018-10-17T20:52:30.403624645Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/services/resolve_account_service.rb:43:in `call'
2018-10-17T20:52:30.403627853Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/controllers/authorize_interactions_controller.rb:48:in `account_from_remote_follow'
2018-10-17T20:52:30.403630953Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/controllers/authorize_interactions_controller.rb:43:in `located_resource'
2018-10-17T20:52:30.403634021Z [5d68d306-76d7-4588-878f-0b8a1797fcd7] app/controllers/authorize_interactions_controller.rb:35:in `set_resource'

I tried to give the public folder already rights with chmod 777, but still run into this

I installed it under a user folder in home

Thank you very much

Cheers,
Jens


#2

Have you configured a different PAPERCLIP_ROOT_PATH than the default?