Permission error when restoring MsSQL database with full text on Linux I'm trying to restore a .bak file created on Windows SQL Server to the Linux version of MSSQL, but I get an error like the following:
Msg 7610, Level 16, State 1, Line 112
Access is denied to &quot;/var/opt/mssql/data/sysft_Catalog.ndf&quot;, or the path is invalid. 
    
    Msg 3156, Level 16, State 50, Line 112
File 'sysft' cannot be restored to '/var/opt/mssql/data/sysft.ndf'. Use WITH MOVE to identify a valid location for the file. 
    
    Msg 3119, Level 16, State 1, Line 112
Problems were identified while planning for the RESTORE statement. Previous messages provide details. 
    
    Msg 3013, Level 16, State 1, Line 112
RESTORE DATABASE is terminating abnormally. 

The command I'm running is the following (or one of many variants I've tried):
RESTORE DATABASE Imported_Database FROM
DISK = '/var/opt/mssql/backup/database_to_import.bak'
WITH
  MOVE 'Dat' TO '/var/opt/mssql/data/Dat.mdf',
  MOVE 'ftrow' TO '/var/opt/mssql/data/Catalog.ndf',
  MOVE 'Log' TO '/var/opt/mssql/data/Log.ldf',
  MOVE 'sysft_Catalog' TO '/var/opt/mssql/data/sysft_Catalog.ndf',
  STATS = 5 -- REPLACE, PARTIAL, etc.
GO

The database is hosted on Ubuntu 20.04.1 LTS in a container created by docker-compose with:
version: &quot;3.2&quot;
services:
  sql-server-db:
    container_name: mssql
    image: mcr.microsoft.com/mssql/server:2019-latest
    ports:
      - &quot;1433:1433&quot;
    environment:
      SA_PASSWORD: &quot;{{ PASSWORD }}&quot;
      ACCEPT_EULA: &quot;Y&quot;
    volumes:
      - ./imports:/var/opt/mssql/backup:ro

What I've noted is that:

The error message is incorrect, as the path of the restore is writeable (i.e. touch /var/opt/mssql/data/sysft_Catalog.ndf as user mssql works fine)
Other databases restore fine, notably if they don't have full text search
The .bak file does restore to MSSQL running on Windows
Importing, then re-exporting from Windows to a new backup doesn't solve the issue
Creating an empty database and restoring to that empty database doesn't help
Creating the files in advance doesn't help
The database would not restore to an Azure SQL Server (&quot;unknown error&quot;) or to Google Cloud SQL (same)
The exact same failure occurs when MSSQL is installed directly on Ubuntu (i.e. without Docker)
The MSSQL errorlog seems to have no additional information
Copy Database from Windows to Linux in SSMS doesn't work
Installing mssql-server-fts doesn't help

Some links to seemingly related issues:

https://github.com/docker/for-win/issues/7259
https://support.microsoft.com/en-my/help/4057087/kb4057087-can-t-restore-database-with-replace-if-filepath-has-path-sep
Restore database in docker container
Brian told me on the chat:
&quot;@FrancescoMantovani Importing the database, dropping the catalog, then re-exporting looks to have resolved the issue. Thank you so much for your help, this was very valuable.&quot;
This was the root cause:
https://support.microsoft.com/en-us/help/923355/error-message-when-you-perform-a-full-backup-of-a-database-in-sql-serv
@Brian, please add info if you need