Answered by:
Windows Server 2012 Network Share Access Denied

Question
-
I have a production server Windows Sever 2012 OS Version 6.3.9600 N/A Build 9600
I can access from my laptop to the share \\server\myshare. Also I can access the server by typing \\server\C$ or \\server\D$. Now I have y application code build in Jenkins server, from there testing the connection to the windows Server by using my network Id and password is okay. However every time I can't deployed the code to the server share. My understanding is deploy is just copy the built result to the share, however I get the "Access Denied" error.
I saw there is a solution on access denied solution.
Indeed the Audit object access is set as Failure on that server and it is gray. It is managed by the admins.
However I have another QA server, it also has the same setting on the Audit object access policy. It has no problem with the network share access. At this moment I have no clue what is the difference or anything I need to take a look at it?
Thanks
Wednesday, July 15, 2020 7:59 PM
Answers
-
Fixed by the changing folder's ownership.
Refs:
and https://www.laptopmag.com/articles/take-ownership-folder-windows-10-using-file-explorer
- Marked as answer by ardmore Thursday, July 23, 2020 10:54 PM
Thursday, July 23, 2020 10:54 PM
All replies
-
Hi,
Thanks for posting here.
However every time I can't deployed the code to the server share. My understanding is deploy is just copy the built result to the share, however I get the "Access Denied" error.
Have you check on the windows server 2012 whether this account has sharing permissions and NTFS permissions manually? If not, add it manually to see if you can copy to there.
In addition, have you granted access persmission to the computer in a domain instead of to the user of that machine?
Try to use a domain user account like: "Domain\user".
Best Regards,
Drake
This “General Windows Desktop Development Issues” Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.
"Win32 API" forum will be migrating to a new home on Microsoft Q&A !
We invite you to post new questions in the "Win32 API" forum’s new home on Microsoft Q&A !
For more information, please refer to the sticky post.Thursday, July 16, 2020 3:20 AM -
The windows server 2012 this account has sharing permissions and NTFS permissions--Full Control.
Yes, I granted access permission to the domain users.
Thursday, July 16, 2020 11:50 AM -
Hi Ardmore,
>I can access from my laptop to the share \\server\myshare. Also I can access the server by typing \\server\C$ or \\server\D$.
Can you paste the file from your laptop to the Windows Server 2012? And does it successfully deploy the application from Jenkins server before?
Regards & Fei
"Win32 API" forum will be migrating to a new home on Microsoft Q&A !
We invite you to post new questions in the "Win32 API" forum’s new home on Microsoft Q&A !
For more information, please refer to the sticky post.Monday, July 20, 2020 1:41 AM -
I don't follow you but I did the steps as below. Say I want the principle or Network account "MyAccount" to access the Windows server
- Added audit to it(https://www.lepide.com/how-to/track-who-read-files-on-your-windows-file-servers.html). Since I want to audit Fail only so I selected Fail from the drop down type list.
- After the deployment the code I checked the even log in Windows server, I found that for event log.(https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4656) . The event ID is 4656.
The log likes
A handle to an object was requested.
Subject:
Security ID: MyDoman\MyAccount
Account Name: MyAccount
Account Domain: MyDomain
Logon ID: 0x310E7B5B
Object:
Object Server: Security
Object Type: File
Object Name: D:\intepub\wwwroot\MyWebsite
Handle ID: 0x0
Process Information:
Process ID: 0x4
Process Name:Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: ReadData (or ListDirectory)
Access Reasons: ReadData (or ListDirectory): Not granted
Access Mask: 0x1
Privileges Used for Access Check: -
Restricted SID Count: 0Also for the safety, I run the attribute command(https://superuser.com/questions/653951/how-to-remove-read-only-attribute-recursively-on-windows)
attrib -r d:\intepub\wwwroot\MyWebsite\*.* /s
But it is still unlucky. I am not sure whether the log gives me the right information.
By the way, the C drive and D drive on Windows Server both are VMware Virtual disk SCSI Disk Device.
Or maybe I have to disjoin VM and rejoin them?(https://social.technet.microsoft.com/Forums/windowsserver/en-US/9807a799-bea3-46ad-92a5-732779135f98/problems-accessing-administrative-shares-remotely-windows-cannot-access-servernamesharename?forum=winserver8gen)
Also the Safely Remove Hardware option for the virtual hardware appears in the Windows System Tray.
- Edited by ardmore Monday, July 20, 2020 9:30 PM edit
Monday, July 20, 2020 5:17 PM -
Fixed by the changing folder's ownership.
Refs:
and https://www.laptopmag.com/articles/take-ownership-folder-windows-10-using-file-explorer
- Marked as answer by ardmore Thursday, July 23, 2020 10:54 PM
Thursday, July 23, 2020 10:54 PM