Even through I am global admin and part respective site collection admin, while adding custom display template in the content web part folder in the master page section coming up with below error. Please help 
Even through I am global admin and part respective site collection admin, while adding custom display template in the content web part folder in the master page section coming up with below error. Please help 
Please follow below tips to troubleshoot the issue.
1.Check the Master Page Gallery whether has unique permission. Also check your permission in the Master Page Gallery.
2.It may be caused by that Custom Script is disabled in the SharePoint Online for security reasons by default.
You should enable Custom Script to resolve this issue.
(1)Go to SharePoint admin center (https://<tenant>-admin.sharepoint.com) -> Click Settings in the left navigation -> Scroll down to “Custom Script” section -> In the Custom Script section, Set “Allow users to run custom script on personal site” and “Allow users to run custom script on self-service created sites” options.
However, this change may take up to 24 hours to reflect. To enable Custom Script in a particular site collection immediately, please use following PowerShell through SharePoint Online Management Shell.
(2)PowerShell.
$AdminSiteURL="https://crescent-admin.sharepoint.com"
$SiteURL="https://crescent.sharepoint.com"
$Cred = Get-Credential
Connect-SPOService -URL $AdminSiteURL -Credential $Cred
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
Reference:
Allow or prevent custom script
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi Emily Du,
Thank you, It is because of custom script disabled, I have enabled it , it worked.
5 people are following this question.