Does anyone now how I can fix the following error. This error happens when I try to create a relationship.
[2019-11-28 06:54:25] Espo.WARNING: E_WARNING: file_put_contents(custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json): failed to open stream: Permission denied {"code":2,"message":"file_put_contents(custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json): failed to open stream: Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":207,"context":{"path":["custom/Espo/Custom/Resources/metadata","entityDefs","InvestigativeLead.json"],"data":"{\n "fields": {\n "name": {\n "type": "varchar",\n "required": false,\n "trim": true,\n "audited": false,\n "readOnly": false,\n "tooltip": false,\n "options": []\n },\n "status": {\n "type": "enum",\n "options": [\n "New",\n "Processing",\n "Closed"\n ],\n "default": "New",\n "view": "views/fields/enum-styled",\n "style": {\n "New": "danger",\n "Processing": "warning",\n "Closed": "success"\n },\n "audited": true,\n "required": false,\n "isSorted": false,\n "readOnly": false,\n "tooltip": false,\n "displayAsLabel": true\n },\n "dateStart": {\n "notNull": false,\n "type": "datetime",\n "required": false,\n "default": "javascript: return this.dateTime.getNow(15);",\n "audited": false,\n "readOnly": true,\n "tooltip": false,\n "minuteStep": 1,\n "after": null,\n "before": null\n },\n "dateEnd": {\n "notNull": false,\n "type": "datetime",\n "required": false,\n "after": "dateStart",\n "audited": false,\n "readOnly": true,\n "tooltip": false,\n "minuteStep": 1,\n "default": null,\n "before": null\n },\n "duration": {\n "type": "duration",\n "start": "dateStart",\n "end": "dateEnd",\n "options": [\n 300,\n 600,\n 900,\n 1800,\n 2700,\n 3600,\n 7200\n ],\n "default": 300,\n "notStorable": true,\n "select": "TIMESTAMPDIFF(SECOND, investigative_lead.date_start, investigative_lead.date_end)",\n "orderBy": "duration {direction}"\n },\n "parent": {\n "type": "linkParent",\n "entityList": [\n "CaseFile"\n ],\n "notStorable": true,\n "required": false,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "description": {\n "type": "text",\n "required": true,\n "seeMoreDisabled": false,\n "readOnly": false,\n "tooltip": false\n },\n "reminders": {\n "type": "jsonArray",\n "notStorable": true,\n "view": "crm:views/meeting/fields/reminders",\n "layoutListDisabled": true,\n "tooltip": false\n },\n "createdAt": {\n "type": "datetime",\n "readOnly": true\n },\n "modifiedAt": {\n "type": "datetime",\n "readOnly": true\n },\n "createdBy": {\n "type": "link",\n "readOnly": true,\n "view": "views/fields/user"\n },\n "modifiedBy": {\n "type": "link",\n "readOnly": true,\n "view": "views/fields/user"\n },\n "assignedUser": {\n "type": "link",\n "required": false,\n "view": "views/fields/assigned-user"\n },\n "teams": {\n "type": "linkMultiple",\n "view": "views/fields/teams"\n },\n "personOfInterest": {\n "type": "link",\n "required": false,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "caseFile": {\n "type": "link",\n "required": true,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "processNotes": {\n "type": "text",\n "required": false,\n "rows": 30,\n "lengthOfCut": 400,\n "seeMoreDisabled": false,\n "readOnly": false,\n "tooltip": false,\n "isCustom": true\n },\n "memorandumOfInvestigation": {\n "type": "link"\n },\n "alerts": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n },\n "witnessCurrentAddress": {\n "name": "witnessCurrentAddress",\n "type": "address",\n "dynamicLogicVisible": {\n "conditionGroup": [\n {\n "type": "equals",\n "attribute": "leadType",\n "value": "Witness"\n }\n ]\n },\n "dynamicLogicReadOnly": null,\n "inlineEditDisabled": false,\n "tooltip": false,\n "isCustom": true\n },\n "witnessCurrentTelephoneNumber": {\n "type": "varchar",\n "default": null,\n "maxLength": null,\n "options": [],\n "isCustom": true,\n "trim": false\n },\n "leadType": {\n "type": "enum",\n "required": true,\n "options": [\n "",\n "Witness",\n "Physical Evidence"\n ],\n "style": {\n "": null,\n "Witness": null,\n "Physical Evidence": null\n },\n "default": "",\n "isCustom": true\n },\n "memorandum": {\n "type": "link"\n },\n "interviewMethodology": {\n "type": "link"\n },\n "notess": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n },\n "eventDescription": {\n "readOnly": true,\n "type": "foreign",\n "link": "caseFile",\n "field": "eventDescription",\n "view": "views/fields/foreign-text",\n "isCustom": true\n },\n "contact": {\n "type": "link"\n },\n "calls": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n }\n },\n "links": {\n "parent": {\n "type": "belongsToParent"\n },\n "createdBy": {\n "type": "belongsTo",\n "entity": "User"\n },\n "modifiedBy": {\n "type": "belongsTo",\n "entity": "User"\n },\n "assignedUser": {\n "type": "belongsTo",\n "entity": "User"\n },\n "teams": {\n "type": "hasMany",\n "entity": "Team",\n "relationName": "EntityTeam",\n "layoutRelationshipsDisabled": true\n },\n "personOfInterest": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "PersonOfInterest",\n "audited": false,\n "isCustom": true\n },\n "caseFile": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "CaseFile",\n "audited": false,\n "isCustom": true\n },\n "memorandumOfInvestigation": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "MemorandumOfInvestigation",\n "audited": true,\n "isCustom": true\n },\n "alerts": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Alert",\n "audited": false,\n "isCustom": true\n },\n "memorandum": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "Memorandum",\n "audited": false,\n "isCustom": true\n },\n "interviewMethodology": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "InterviewMethodology",\n "audited": false,\n "isCustom": true\n },\n "notess": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Notes",\n "audited": false,\n "isCustom": true\n },\n "contact": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "Contact",\n "audited": false,\n "isCustom": true\n },\n "calls": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Call",\n "audited": false,\n "isCustom": true\n }\n },\n "collection": {\n "sortBy": "dateStart",\n "asc": false,\n "filters": {\n "reportFilter5c778786707be4ce9": {\n "isReportFilter": true,\n "className": "\\\\Espo\\\\Modules\\\\Advanced\\\\Core\\\\Re por tFilter",\n "id": "5c778786707be4ce9"\n }\n }\n },\n "indexes": {\n "dateStartStatus": {\n "columns": [\n "dateStart",\n "status"\n ]\n },\n "dateStart": {\n "columns": [\n "dateStart",\n "deleted"\n ]\n },\n "status": {\n "columns": [\n "status",\n "deleted"\n ]\n },\n "assignedUser": {\n "columns": [\n "assignedUserId",\n "deleted"\n ]\n },\n "assignedUserStatus": {\n "columns": [\n "assignedUserId",\n "status"\n ]\n }\n }\n}","flags":0,"fullPath":"custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json"}} []
[2019-11-28 06:54:25] Espo.WARNING: E_WARNING: file_put_contents(custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json): failed to open stream: Permission denied {"code":2,"message":"file_put_contents(custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json): failed to open stream: Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":207,"context":{"path":["custom/Espo/Custom/Resources/metadata","entityDefs","InvestigativeLead.json"],"data":"{\n "fields": {\n "name": {\n "type": "varchar",\n "required": false,\n "trim": true,\n "audited": false,\n "readOnly": false,\n "tooltip": false,\n "options": []\n },\n "status": {\n "type": "enum",\n "options": [\n "New",\n "Processing",\n "Closed"\n ],\n "default": "New",\n "view": "views/fields/enum-styled",\n "style": {\n "New": "danger",\n "Processing": "warning",\n "Closed": "success"\n },\n "audited": true,\n "required": false,\n "isSorted": false,\n "readOnly": false,\n "tooltip": false,\n "displayAsLabel": true\n },\n "dateStart": {\n "notNull": false,\n "type": "datetime",\n "required": false,\n "default": "javascript: return this.dateTime.getNow(15);",\n "audited": false,\n "readOnly": true,\n "tooltip": false,\n "minuteStep": 1,\n "after": null,\n "before": null\n },\n "dateEnd": {\n "notNull": false,\n "type": "datetime",\n "required": false,\n "after": "dateStart",\n "audited": false,\n "readOnly": true,\n "tooltip": false,\n "minuteStep": 1,\n "default": null,\n "before": null\n },\n "duration": {\n "type": "duration",\n "start": "dateStart",\n "end": "dateEnd",\n "options": [\n 300,\n 600,\n 900,\n 1800,\n 2700,\n 3600,\n 7200\n ],\n "default": 300,\n "notStorable": true,\n "select": "TIMESTAMPDIFF(SECOND, investigative_lead.date_start, investigative_lead.date_end)",\n "orderBy": "duration {direction}"\n },\n "parent": {\n "type": "linkParent",\n "entityList": [\n "CaseFile"\n ],\n "notStorable": true,\n "required": false,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "description": {\n "type": "text",\n "required": true,\n "seeMoreDisabled": false,\n "readOnly": false,\n "tooltip": false\n },\n "reminders": {\n "type": "jsonArray",\n "notStorable": true,\n "view": "crm:views/meeting/fields/reminders",\n "layoutListDisabled": true,\n "tooltip": false\n },\n "createdAt": {\n "type": "datetime",\n "readOnly": true\n },\n "modifiedAt": {\n "type": "datetime",\n "readOnly": true\n },\n "createdBy": {\n "type": "link",\n "readOnly": true,\n "view": "views/fields/user"\n },\n "modifiedBy": {\n "type": "link",\n "readOnly": true,\n "view": "views/fields/user"\n },\n "assignedUser": {\n "type": "link",\n "required": false,\n "view": "views/fields/assigned-user"\n },\n "teams": {\n "type": "linkMultiple",\n "view": "views/fields/teams"\n },\n "personOfInterest": {\n "type": "link",\n "required": false,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "caseFile": {\n "type": "link",\n "required": true,\n "audited": false,\n "readOnly": false,\n "tooltip": false\n },\n "processNotes": {\n "type": "text",\n "required": false,\n "rows": 30,\n "lengthOfCut": 400,\n "seeMoreDisabled": false,\n "readOnly": false,\n "tooltip": false,\n "isCustom": true\n },\n "memorandumOfInvestigation": {\n "type": "link"\n },\n "alerts": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n },\n "witnessCurrentAddress": {\n "name": "witnessCurrentAddress",\n "type": "address",\n "dynamicLogicVisible": {\n "conditionGroup": [\n {\n "type": "equals",\n "attribute": "leadType",\n "value": "Witness"\n }\n ]\n },\n "dynamicLogicReadOnly": null,\n "inlineEditDisabled": false,\n "tooltip": false,\n "isCustom": true\n },\n "witnessCurrentTelephoneNumber": {\n "type": "varchar",\n "default": null,\n "maxLength": null,\n "options": [],\n "isCustom": true,\n "trim": false\n },\n "leadType": {\n "type": "enum",\n "required": true,\n "options": [\n "",\n "Witness",\n "Physical Evidence"\n ],\n "style": {\n "": null,\n "Witness": null,\n "Physical Evidence": null\n },\n "default": "",\n "isCustom": true\n },\n "memorandum": {\n "type": "link"\n },\n "interviewMethodology": {\n "type": "link"\n },\n "notess": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n },\n "eventDescription": {\n "readOnly": true,\n "type": "foreign",\n "link": "caseFile",\n "field": "eventDescription",\n "view": "views/fields/foreign-text",\n "isCustom": true\n },\n "contact": {\n "type": "link"\n },\n "calls": {\n "type": "linkMultiple",\n "layoutDetailDisabled": true,\n "layoutMassUpdateDisabled": true,\n "noLoad": true,\n "importDisabled": true,\n "isCustom": true\n }\n },\n "links": {\n "parent": {\n "type": "belongsToParent"\n },\n "createdBy": {\n "type": "belongsTo",\n "entity": "User"\n },\n "modifiedBy": {\n "type": "belongsTo",\n "entity": "User"\n },\n "assignedUser": {\n "type": "belongsTo",\n "entity": "User"\n },\n "teams": {\n "type": "hasMany",\n "entity": "Team",\n "relationName": "EntityTeam",\n "layoutRelationshipsDisabled": true\n },\n "personOfInterest": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "PersonOfInterest",\n "audited": false,\n "isCustom": true\n },\n "caseFile": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "CaseFile",\n "audited": false,\n "isCustom": true\n },\n "memorandumOfInvestigation": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "MemorandumOfInvestigation",\n "audited": true,\n "isCustom": true\n },\n "alerts": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Alert",\n "audited": false,\n "isCustom": true\n },\n "memorandum": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "Memorandum",\n "audited": false,\n "isCustom": true\n },\n "interviewMethodology": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "InterviewMethodology",\n "audited": false,\n "isCustom": true\n },\n "notess": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Notes",\n "audited": false,\n "isCustom": true\n },\n "contact": {\n "type": "belongsTo",\n "foreign": "investigativeLeads",\n "entity": "Contact",\n "audited": false,\n "isCustom": true\n },\n "calls": {\n "type": "hasMany",\n "foreign": "investigativeLead",\n "entity": "Call",\n "audited": false,\n "isCustom": true\n }\n },\n "collection": {\n "sortBy": "dateStart",\n "asc": false,\n "filters": {\n "reportFilter5c778786707be4ce9": {\n "isReportFilter": true,\n "className": "\\\\Espo\\\\Modules\\\\Advanced\\\\Core\\\\Re por tFilter",\n "id": "5c778786707be4ce9"\n }\n }\n },\n "indexes": {\n "dateStartStatus": {\n "columns": [\n "dateStart",\n "status"\n ]\n },\n "dateStart": {\n "columns": [\n "dateStart",\n "deleted"\n ]\n },\n "status": {\n "columns": [\n "status",\n "deleted"\n ]\n },\n "assignedUser": {\n "columns": [\n "assignedUserId",\n "deleted"\n ]\n },\n "assignedUserStatus": {\n "columns": [\n "assignedUserId",\n "status"\n ]\n }\n }\n}","flags":0,"fullPath":"custom/Espo/Custom/Resources/metadata/entityDefs/InvestigativeLead.json"}} []
Comment