"Internal error has occurred" while trying to update avatar picture

When I try to update my avatar picture in my profile, I get a message saying “Error: An iInternal error has occurred.”, and the avatar picture won’t be updated.
Healthcheck is all green, there is no error shown in it.

How can I update my avatar pic?

Hello @sawwee,

Can you check the passbolt log file logs/error.log and copy/paste here any relevant message.

Log file helped, thank you, it’s solved now.

1 Like

my log file stated
[Burzum\FileStorage\Storage\StorageException] The directory ‘/var/www/passbolt/webroot/img/public/Avatar/14/65/f1/aff7a443d0844291a440c9df4673fc70’ could not be created.
Caused by: [RuntimeException] The directory ‘/var/www/passbolt/webroot/img/public/Avatar/14/65/f1/aff7a443d0844291a440c9df4673fc70’ could not be created.
Request URL: /users/b84179bd-67e3-4526-9bdc-6702313e4e48.json?api-version=v2
Referer URL: https://passbolt.local/app/settings/profile

Hello @stijn_lenaerts,

Could you check that your webserver user (www-data or nginx) has the permission to write in the folder /var/www/passbolt/webroot/img/public/?

ll /var/www/passbolt/webroot/img/
total 0
drwxr-xr-x. 2 nginx nginx 87 May 3 2018 avatar
drwxr-xr-x. 2 root root 24 Aug 14 2018 background
drwxr-xr-x. 2 nginx nginx 191 Aug 14 2018 controls
drwxr-xr-x. 2 nginx nginx 66 May 3 2018 illustrations
drwxr-xr-x. 2 nginx nginx 191 Aug 14 2018 logo
drwxrwxr-x. 4 nginx nginx 47 Apr 25 10:02 public
drwxr-xr-x. 2 nginx nginx 109 May 3 2018 third_party

Can you ensure that the whole path /var/www/passbolt/webroot/img/public/Avatar/14/65/f1/aff7a443d0844291a440c9df4673fc70 is writable.

The strange thing is that this path does not exists.
I have tried to create this path every time I tried to upload a picture ( it changes every time if I try to upload)

At least this part /var/www/passbolt/webroot/img/public/Avatar/ should be writable, if the folder Avatar does not exist, could you create it.

I did this also :slight_smile:
ll /var/www/passbolt/webroot/img/public/
total 0
drwxr-xr-x. 2 nginx nginx 6 Apr 25 10:02 Avatar
-rw-rw-r–. 1 nginx nginx 0 May 3 2018 empty
drwxrwxr-x. 3 nginx nginx 20 Oct 17 2018 images

But I get also a notice on my health-check site

The temporary directory and its content are not writable.

The public image directory and its content are not writable.

the healtcheck should give you tips to solve this part, did you execute the proposed commands ?

ok so healthcheck shell says now

[PASS] The temporary directory and its content are writable.
[PASS] The public image directory and its content are writable.

But web page still shows

The public image directory and its content are not writable.

Did you run the healthcheck with your webserver user ?
su -s /bin/bash -c "./bin/cake passbolt healthcheck" nginx
Are you sure your webserver user is nginx and not www-data ?

$ sudo su -s /bin/bash -c “./bin/cake passbolt healthcheck” nginx

 ____                  __          ____
/ __ \____  _____ ____/ /_  ____  / / /_

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//.__/__//_/

Open source password manager for teams

Healthcheck shell

Environment

[PASS] PHP version 7.2.17.
[PASS] PCRE compiled with unicode support.
[PASS] The temporary directory and its content are writable.
[PASS] The public image directory and its content are writable.
[PASS] The logs directory and its content are writable.
[PASS] GD or Imagick extension is installed.
[PASS] Intl extension is installed.
[PASS] Mbstring extension is installed.

Config files

[PASS] The application config file is present
[PASS] The passbolt config file is present

Core config

[PASS] Debug mode is off.
[PASS] Cache is working.
[PASS] Unique value set for security.salt

it is running with nginx

Can you tell me more about your environment and how you installed passbolt ?
Did you use our material ? docker container or install scripts ?
Or you installed passbolt on an configured environment of your own ? If you are in this case, are you using php-fpm ? If yes, are you sure the process are running with the same user nginx as your webserver ?

I am using a VM running on a Xenserver pool using CentOS Linux release 7.6.1810 (Core)
I used v2.0.4 - Something we all adore to start with having to use nginx as webserver and running the installer from your site instructions using the script

I have checked for the user running process php-fpm: pool www = user nginx

Hey there,

Might be dummy question but @stijn_lenaerts do you have selinux enabled?

1 Like

:thinking: yes …

SOOOOOOOO this solved my problem :flushed: