YunoHost-Apps / castopod_ynh

Castopod package for YunoHost
https://podlibre.org/
GNU General Public License v3.0
23 stars 7 forks source link

Error when creating a person #110

Closed 0utl4w closed 11 months ago

0utl4w commented 1 year ago

How to post a meaningful bug report

  1. Read this whole template first.
  2. Determine if you are on the right place:
    • If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!
    • Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.
    • When in doubt, post here and we will figure it out together.
  3. Delete the italic comments as you write over them below, and remove this guide.

Describe the bug

I tried to create a "person" in castopod.

Context

Steps to reproduce

We seem to have hit a snag. Please try again later... ErrorException

touch(): Unable to create file /home/yunohost.app/castopod/media/persons/index.html because Permission denied at /var/www/castopod/modules/Media/FileManagers/FS.php:34'

Expected behavior

New person is created.

Logs

ErrorException: touch(): Unable to create file /home/yunohost.app/castopod/media/persons/index.html because Permission denied in /var/www/castopod/modules/Media/FileManagers/FS.php:34 Stack trace:

0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler()

1 /var/www/castopod/modules/Media/FileManagers/FS.php(34): touch()

2 /var/www/castopod/modules/Media/Entities/Image.php(151): Modules\Media\FileManagers\FS->save()

3 /var/www/castopod/modules/Media/Entities/Image.php(101): Modules\Media\Entities\Image->saveSizes()

4 /var/www/castopod/modules/Media/Models/MediaModel.php(120): Modules\Media\Entities\Image->saveFile()

5 /var/www/castopod/app/Entities/Person.php(82): Modules\Media\Models\MediaModel->saveMedia()

6 /var/www/castopod/vendor/codeigniter4/framework/system/Entity/Entity.php(483): App\Entities\Person->setAvatar()

7 /var/www/castopod/vendor/codeigniter4/framework/system/Entity/Entity.php(150): CodeIgniter\Entity\Entity->__set()

8 /var/www/castopod/vendor/codeigniter4/framework/system/Entity/Entity.php(131): CodeIgniter\Entity\Entity->fill()

9 /var/www/castopod/modules/Admin/Controllers/PersonController.php(81): CodeIgniter\Entity\Entity->__construct()

10 /var/www/castopod/modules/Admin/Controllers/PersonController.php(25): Modules\Admin\Controllers\PersonController->attemptCreate()

11 /var/www/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(918): Modules\Admin\Controllers\PersonController->_remap()

12 /var/www/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(494): CodeIgniter\CodeIgniter->runController()

13 /var/www/castopod/vendor/codeigniter4/framework/system/CodeIgniter.php(353): CodeIgniter\CodeIgniter->handleRequest()

14 /var/www/castopod/public/index.php(85): CodeIgniter\CodeIgniter->run()

15 {main}

orhtej2 commented 1 year ago

Tmp fix is to sudo chown -R castopod /home/yunohost.app/castopod.

I'll release updated version after I restore my system to working state again and investigate why root owns parts of media folder.

0utl4w commented 1 year ago

Thx, tmp fix worked!