-2

i have an app, that needs to run in the folder in root of C drive (C:\AppFolder). And on client, i need map network drive for C:\ because that app searches for \AppFolder... directory. So i have shared my C:\ drive on my win server 2012 and mapped it on my client. And've set full control permissions for everyone (guest account on server is enabled also) on C:\AppFolder, but when im trying to writte to this folder if i access it thru mapped drive, it fails. If I additionally share C:\AppFolder, i can writte to that folder if i acces it thru \server\AppFolder, but i still cant writte thru mapped drive. I've tried all kind of permission setting but without any success. Thanx fo help

Ofer
  • 1
  • 1
  • 1

1 Answers1

2

Slight confusion. Does the server have a server-side application that requires the application to reside in C:\AppFolder? I ask this, as the client obviously won't have a drive mapped as C:.

Aside from that, there's two things that are possibly happening here. First, the share may still be set as read-only (check by typing NET SHARE <SHARENAME> from the server console.

Secondly, User Account Control (UAC) may be preventing access.

However, in my opinion, and it's only me being a bit of a purest, I'd have the actual application data on D:\APPFOLDER, and then create a symbolic link (aka junction) on C:\APPFOLDER, pointing at D:\APPFOLDER. This can be achieved using MKLINK.

Finally, for completeness, could you try the following from the server, and publish the results:

icacls c:\appfolder

--- Edit 01/10 @ 18:03:

I would do the following:

REM Remove share
net share appfolder /d

REM Rename existing APPFOLDER dir
ren c:\appfolder appfolder_old

REM Create an "approot" dir on D:
md d:\approot

REM Share it
net share approot=d:\approot /remark:"The parent of my appfolder." /cache:none /grant:everyone,full

REM Set NTFS permissions (using CACLS instead of ICACLS, as it can stamp over existing permissions more easily)
REM Note "authenticated users" instead of "everyone" and "Modify" instead of "Full Control"
echo Y|cacls d:\approot /grant "Administrators:F" "SYSTEM:F" "Authenticated Users:M"

REM Create an appfolder dir under approot
md d:\approot\appfolder    

REM Create a symbolic link on C:
mklink /d c:\appfolder d:\approot\appfolder

REM Copy contents
robocopy c:\appfolder_old c:\appfolder /mir
Simon Catlin
  • 5,232
  • 3
  • 17
  • 20
  • Edit: 5 min edit limit: thanks for answer 1) client app is set to g:\ (mapped drive) 2) share name AppFolder Path C:\AppFOlder Remark Maximum users No limit Users Caching Manual caching of documents Permission BUILTIN\Administrators, FULL Everyone, FULL 3) icacls AppFolder C:\AppFolder NT AUTHORITY\SYSTEM:(OI)(CI)(F) DOMAIN\Administrators:(OI)(CI)(F) BUILTIN\Administrators:(OI)(CI)(F) Everyone:(OI)(CI)(F) – Ofer Sep 29 '13 at 20:57
  • 1
    OK, so the share is read/write (Everyone:Full). Also, the NTFS permissions are *wide* open (Everyone:(IO)(CI)(F)). You may want to change this (!). However, and this might be me getting confused, the output from NET SHARE is for the shared C:\APPFOLDER share. Can you publish the output for the share that points at C:\ ? Further info to follow in edited post above... – Simon Catlin Oct 01 '13 at 16:52