Symptoms
Online Store synchronization fails with the following error:
Synchronization failed with error: Couldn't open file for writing for css FILE_NAME
Cause
PBA can not create a css file for usage scenario
Resolution
During store synchronization PBA creates a css file for every usage scenario in corresponding store directory. Check permissions assigned to /usr/local/bm/templatestore/webroot/cache/store_id/css/
folder on PBA online store server. Owner and group should be apache:apache
, permissions 755. For example for store #1:
[root@store ~]# ls -ld /usr/local/bm/templatestore/webroot/cache/1/css/
drwxr-xr-x 2 apache apache 4096 Nov 18 23:27 /usr/local/bm/templatestore/webroot/cache/1/css/
If owner or permissions are wrong set them to correct one, like this:
[root@store ~]# chown apache:apache /usr/local/bm/templatestore/webroot/cache/1/css/
[root@store ~]# chmod 755 /usr/local/bm/templatestore/webroot/cache/1/css/
Also check if permissions and owner are set correctly for other stores.
By default apache:apache
ownership is assigned to all files and directories inside webroot
so wrong ownership can be fixed like this:
[root@store ~]# chown -R apache:apache /usr/local/bm/templatestore/webroot
Folders ownership can be wrong for different reasons, for example
- PBA of version lower then 5.4.16 was migrated to CentOS 6 or RHEL 6 (bug PBA-50358)
- Manual store backup restoration
- Others