Unable to Upload User Avatar

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

When you try to upload an image for user avatar from Profile page, clicking on Confirm to save the image does nothing. The upload window just stands still. Closing it simply reverts to the original state.

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2014-03-19 16:40:08,057 http-bio-8080-exec-3 ERROR superadmin 1000x4640x1 181u6l1 192.168.0.223 /rest/api/latest/user/avatar [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) ... Caused by: java.lang.NullPointerException at javax.imageio.ImageIO.write(Unknown Source) at com.atlassian.jira.avatar.AvatarManagerImpl.processImage(AvatarManagerImpl.java:211) at com.atlassian.jira.avatar.AvatarManagerImpl.create(AvatarManagerImpl.java:145) at com.atlassian.jira.avatar.AvatarPickerHelperImpl.convertTemporaryToReal(AvatarPickerHelperImpl.java:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <+1> at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy252.convertTemporaryToReal(Unknown Source) <+3> at java.lang.reflect.Method.invoke(Unknown Source)

Diagnosis

JIRA fails to write to the folder JIRA_Home/data/avatars.

Cause

You don't have the permission to write to the folder JIRA_Home/data/avatars.

Solution

Resolution

Modify the security settings of JIRA_Home/data/avatars folder and grant the permission to write/modify it to the user which is running the JIRA process.

Steps :

Linux :

    • chmod -R u=rwx,g=rwx,o=rx JIRA_Home/data/avatars

Windows :

    1. Go to JIRA_Home/datadirectory, right-click "avatars" folder and view the Properties

    2. Go to the Security tab and check permission for who is running Jira. If the user doesn’t have write/modify permission click Edit… and allow it

Related Content

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.