# Access Denied- Cannot open Samba

**URL:** <https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083>\
**Category:** V5 Issue\
**Created:** [June 18, 2026, 12:46pm UTC](https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083 "2026-06-18T12:46:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarshall05](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@amarshall05](https://forum.sambapos.com/u/amarshall05)\
**Post date:** [June 18, 2026, 12:46pm UTC](https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083/1 "2026-06-18T12:46:52Z")

</div>

Hi,

With having so many issues (and being told we probably needed a new computer system for Samba) we purchased a new computer. Luckily we kept the old one which still has Samba running fine for now, but we cannot get Samba working on the new computer.

We followed the tutorial posted on the Samba website however never seen this error before - whether this is because it’s a fresh install or what we’re not sure.

I’ve also emailed Samba support, not sure which was was quickest we’d get a response on.

* * *

[General Info]

Application: SambaPOS  
Version: 5.7.26  
Region:  
DB: SQ  
Machine: SERVER1  
User: user  
Date: 18/06/2026  
Time: 12:21

User Explanation:

## user said “”

[Exception Info 1]

Top-level Exception  
Type: System.Data.SqlClient.SqlException  
Message: CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file ‘C:\Users\userSambaPOS5.mdf’.  
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.  
Source: .Net SqlClient Data Provider  
Stack Trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)  
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)  
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)  
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)  
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<>c.<NonQuery>b__4_0(DbCommand t, DbCommandInterceptionContext`1 c)  
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)  
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)  
at System.Data.Entity.SqlServer.SqlProviderServices.\<\>c\_\_DisplayClass52\_0.b\_\_0(DbConnection conn)  
at System.Data.Entity.SqlServer.SqlProviderServices.\<\>c\_\_DisplayClass60\_0.b\_\_0()  
at System.Data.Entity.Infrastructure.DbExecutionStrategy.\<\>c\_\_DisplayClass17\_0.b\_\_0()  
at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute(Action operation) at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act)  
at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act) at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript)  
at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection)  
at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase()  
at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection)  
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)  
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)  
at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext) at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState) at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) at Samba.Persistance.Data.Initializer.Create(CommonDbContext context) at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context) at System.Data.Entity.Internal.InternalContext.<>c__DisplayClass66_0`1.b\_\_0()  
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)  
at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()  
at System.Data.Entity.Internal.LazyInternalContext.\<\>c.b\_\_58\_0(InternalContext c)  
at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)  
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()  
at System.Data.Entity.Internal.InternalContext.Initialize()  
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()  
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get\_ObjectContext()  
at Samba.Persistance.Data.WorkspaceFactory.CreateReadOnly()  
at Samba.Persistance.Data.Dao.Single[T](Expression`1 predictate, Expression`1 includes)  
at Samba.Presentation.Bootstrapper.ConfigureAggregateCatalog()  
at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)  
at Samba.Presentation.App.RunInReleaseMode()

* * *

[Assembly Info]

mscorlib, Version=4.0.0.0  
System, Version=4.0.0.0  
Samba.Services, Version=5.7.26.421  
Samba.Domain, Version=5.7.26.421  
Samba.Infrastructure.Data, Version=5.7.26.421  
System.ComponentModel.Composition, Version=4.0.0.0  
Samba.Presentation.Services, Version=5.7.26.421  
System.Core, Version=4.0.0.0  
PresentationCore, Version=4.0.0.0  
WindowsBase, Version=4.0.0.0  
PresentationFramework, Version=4.0.0.0  
DevExpress.Xpf.LayoutControl.v17.2, Version=17.2.13.0  
System.Xml, Version=4.0.0.0  
DevExpress.Xpf.Grid.v17.2, Version=17.2.13.0  
DevExpress.Xpf.Grid.v17.2.Core, Version=17.2.13.0  
System.Xaml, Version=4.0.0.0  
Samba.Infrastructure, Version=5.7.26.421  
Microsoft.Practices.Prism, Version=4.0.0.0  
System.Runtime.Serialization, Version=4.0.0.0  
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0  
DevExpress.Xpf.Core.v17.2, Version=17.2.13.0  
System.Windows.Forms, Version=4.0.0.0  
System.Drawing, Version=4.0.0.0  
Samba.Persistance, Version=5.7.26.421  
Stateless, Version=1.0.0.0  
PropertyTools, Version=2012.4.14.1  
Samba.Localization, Version=5.7.26.421  
ReachFramework, Version=4.0.0.0  
EntityFramework, Version=6.0.0.0  
FluentValidation, Version=3.4.0.0  
NCalc, Version=1.3.8.0  
Microsoft.CSharp, Version=4.0.0.0  
Omu.ValueInjecter, Version=2.3.0.0  
Microsoft.Practices.ServiceLocation, Version=1.0.0.0  
DevExpress.Data.v17.2, Version=17.2.13.0  
WindowsInput, Version=1.0.4.0

* * *

* * *

 ![IMG_7800](https://forum.sambapos.com/uploads/default/original/3X/0/9/09b9fcc3ba5add4751bada8c575f3159281f9b8e.png)

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [June 18, 2026, 2:29pm UTC](https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083/2 "2026-06-18T14:29:55Z")

</div>

Samba have forwarded your email to me saying you bought another licence from me back in 2018 🤷

Havnt looked too deep at the error log but the directory doesn’t look right…

‘C:\Users\userSambaPOS5.mdf’

your database mdf is in the root of the users folder and called ‘userSambaPOS5.mdf’?

I have replied to the email samba forwarded, I can investigate your issue via remote support if required but would be chargeable support, min one hour

---

<div class="post-metadata">

**Author:** ![amarshall05](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@amarshall05](https://forum.sambapos.com/u/amarshall05)\
**Post date:** [June 18, 2026, 2:44pm UTC](https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083/3 "2026-06-18T14:44:45Z")

</div>

Hi,

Thanks for the reply. I’m not sure really, this is a fresh computer delivered today so when installing it must have rooted to that file location but not sure where it should be if not there.

The email you replied to, you mentioned you had the licensing for one of our venues however nothing about the other one which is what we’re having issues with. I have replied to your email with details about which license email it is.

---

<div class="post-metadata">

**Author:** ![Memo](https://forum.sambapos.com/user_avatar/forum.sambapos.com/memo/32/55443_2.png) [@Memo](https://forum.sambapos.com/u/Memo)\
**Post date:** [June 18, 2026, 6:54pm UTC](https://forum.sambapos.com/t/access-denied-cannot-open-samba/32083/4 "2026-06-18T18:54:01Z")

</div>

If you’re trying to use LocalDB 2017 I recall there being issues with that.

You can see here `C:\Users\userSambaPOS5.mdf` something’s not building the path properly - it should be `C:\Users\user\SambaPOS5.mdf`

If you’re using LocalDB 2017, try installing the cumulative update for 2017 and retry. [https://www.microsoft.com/en-us/download/details.aspx?id=56128](https://www.microsoft.com/en-us/download/details.aspx?id=56128)

What setup did you configure?
