You have no rights to view any items in this repository

If you are having a problem using Vault, post a message here.
Post Reply
sparticus13
Posts: 4
Joined: Thu Oct 01, 2015 4:55 pm

You have no rights to view any items in this repository

Post by sparticus13 » Thu Oct 01, 2015 5:13 pm

Recently We moved out of our data center to a new location. For migrating vault over to the new hardware I started by taking a standard SQL backup of each vault database. We had Vault 7.0 Pro installed at the time on SQL Server 2014. Then moved the files over to our new SQL 2014 server at the new location and did a standard restore.

On our web server I installed the new Vault 8.0 Pro. It was installed using a Domain service account that was created for vault. The account has access to the web server and sql server/databases. The install detected the current 7.0 DB and updated them to 8.0 as I choose to keep the current DBs. After the install I logged into the Admin web service and applied the new 8.0 license and deleted the 7.0 one.

Next I installed the 8.0 client on my laptop upgrading from the 7.0. I connected just fine and could see the repository. I logged out and installed the client on our next users computer. When I tried to login from that users account/pc it connected but gave the error "You have no rights to view any items in this repository."

I tried clearing all the Vault cache for that client. Still had the same error. I then re logged into it from my laptop and account. I was also now presented with the same error too. I was only able to log in once. After that any user and client gets the error. Also if I go to the admin web service I can only access some menu items. Others give me the message "Error in the application".

I have tried re initializing the dotnet asp framework "aspnet_regiis -I" No errors happen but I sill cannot access vault correctly. I have also reboot the web server. Running Server 2012 R2 Update 1.

Any ideas what to do? I have also uninstalled and reinstalled vault.

Thanks,
Chris

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: You have no rights to view any items in this repository

Post by Beth » Fri Oct 02, 2015 8:37 am

Open your SQL Server Management Studio. Check that your none of your Vault databases are in single_user mode (sgvault, sgmaster, sgvaultindex, sgnotify and if you are on Vault Pro, check sgdragnet).
Beth Kieler
SourceGear Technical Support

sparticus13
Posts: 4
Joined: Thu Oct 01, 2015 4:55 pm

Re: You have no rights to view any items in this repository

Post by sparticus13 » Fri Oct 02, 2015 3:39 pm

I just checked and all of them are in Multi User Mode. I did notice that the compatibility mode was 2012. I switched it to 2014 for each. No change in the error. Also does the DB owner mater? Should it be set to the domain service account used with IIS?

Thanks

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: You have no rights to view any items in this repository

Post by Beth » Fri Oct 02, 2015 4:01 pm

Which account is used for db_owner depends on how it was set up.

Do you recall when the Vault server was installed if Machine, System, or Custom was chosen for the IIS Process Model, and whether SQL or Windows authentication was chosen when connecting to the SQL Server? If not, then go to the web.config file in your vaultservice directory on the server. The default location is C:\inetpub\wwwroot, but it's possible to have installed it elsewhere. Search for the line <add key="ConnectString". In that line, it will tell you how it is connecting. If it says sgvaultuser, then that is the user that needs db_owner rights to the database. If it has a domain user listed in that line, then that user needs db_owner rights to the database. If it has neither of those, then the IIS APPPOOL\VaultAppPool, IIS APPPOOL\VaultNotifyAppPool, NT AUTHORITY\IUSR, and NTAUTHEORITY\NETWORK SERVICE all need db_owner rights to the Vault databases.
Beth Kieler
SourceGear Technical Support

sparticus13
Posts: 4
Joined: Thu Oct 01, 2015 4:55 pm

Re: You have no rights to view any items in this repository

Post by sparticus13 » Fri Oct 02, 2015 5:00 pm

It was used with custom. A domain service account was used for the install. The IIS app pool for the vault pools all list this account correctly. "METAPOWER\svc_Vault" Is the domain account I created and used. The connection strings in the web configs is set to Integrated Security='true'. As it is the IIS app pool process that is running these strings I assume it is using the METAPOWER\svc_Vault domain account when connecting to SQL. This is account is listed in the logins for SQL and for testing is currently a sysadmin role.

I tried to set the owner in SQL using management studio under the files section of the DB properties to the this user account but was given the following error.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Set owner failed for Database 'sgvaultindex'. (Microsoft.SqlServer.Smo)


The proposed new database owner METAPOWER\svc_Vault is mapped as user METAPOWER\svc_Vault in this database.
Parameter name: METAPOWER\svc_Vault

I checked under permissions and the user is listed with the connect permission and grantor as dbo. I assume this is ok then.

I just deleted the databases and restored them again from the original backups. Also reinstalling vault. This time I get the error right away. Last time I managed one successful login and could see everything in the repository. I have no idea why this worked once and then never again. Nothing changed on either the web or sql servers.

sparticus13
Posts: 4
Joined: Thu Oct 01, 2015 4:55 pm

Re: You have no rights to view any items in this repository

Post by sparticus13 » Fri Oct 02, 2015 7:00 pm

I fixed it. I turned on debug logging on the vault server and logging in a client. The server log showed two errors related to not having enough file space on the tempdb. A check in SQL showed that the tempdbs were set at 5MB and no auto growth. I set it to auto grow in 10MB increments. This fixed the problem!

Thanks

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: You have no rights to view any items in this repository

Post by Beth » Mon Oct 05, 2015 8:27 am

Thanks for the updates. I'm happy to hear you are working again.
Beth Kieler
SourceGear Technical Support

Post Reply