Error Code: [30:422] SQL Server user failed to access directory for a SQL Server Restore to a New Location
Article ID: SQL0021 SQL Linux server restore operations might fail because of a problem with permissions.
The following SQL Linux server restore operations might fail because of a problem with permissions:
- Restore operations to a folder that is different from the default SQL data folder (/var/opt/mssql/data/)
- Restore operations that use the standby option
Note: The standby option leaves the database in the restoring state.
The following error is displayed:
Error Code: [30:422] Description: SQL Server user failed to access directory [directory path]. Please check the permissions for SQL Server user.
The ‘mssql’ user does not have proper access to the destination location or to the undo path.
The 'mssql' user must have, at a minimum, read access and write access to the destination folder. For more information, see "Change the default data or log directory location", at https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf#datadir.