ARTIFACTORY: How to resolve the ‘503 : Could not create file store folder’ error?

Nir Shervi
2023-01-22 11:07

Problem Description:

The following error indicates there is an issue with the filestore permissions:2022-11-24T20:51:41.583Z [jfrt ] [ERROR] [2eb124d82e61dabf] [.p.u.FileBinaryProviderUtil:15] [art-init            ] - Could not create dir '/home/nirsh/shards/shard1'
2022-11-24T20:51:41.584Z [jfrt ] [ERROR] [2eb124d82e61dabf] [.p.u.FileBinaryProviderUtil:15] [art-init            ] - Could not create dir '/home/nirsh/shards/shard1/_pre'
2022-11-24T20:51:41.586Z [jfrt ] [ERROR] [2eb124d82e61dabf] [wareFileBinaryProviderImpl:160] [art-init            ] - Binary store /home/nirsh/shards/shard1 deactivated due to: 503 : Could not find file store folder '/home/nirsh/shards/shard1'

This issue prevents Artifactory service startup.

In this example, the Artifactory user (artifactory:artifactory default) has insufficient permissions for the NFS directory:$ls -la
dr--r--r--  11 root       root         4096 Nov 10 17:48 shards/

Solution:

Execute the following command in order to grant the filestore and NFS root directory the correct permissions:chown -R artifactory:artifactory shards/chmod 755 shards/
Verify your filestore directory has the following permission:$ls -la
drwxr-xr-x  11 artifactory artifactory  4096 Nov 10 17:48 shards/

Restart the Artifactory service in order for the changes to take effect.