I am calling cmd.exe /c mklink /d C:\LOCAL\PATH \\REMOTE\PATH
from cygwin as Admin and the drive can be accessed from multiple Admin's sessions as expected. However, my point is to use it by unprivileged local users as well.
I have changed the owner of the symlink to the user chown USER /LOCAL/PATH
but I still can not access the drive:
USER@DESKTOP-P014S4E ~
$ stat /LOCAL/PATH
File: ‘/LOCAL/PATH’ -> ‘//REMOTE/PATH’
Size: 55 Blocks: 0 IO Block: 65536 symbolic link
Device: cccc11d4h/3435925972d Inode: 2814749767198837 Links: 1
Access: (0777/lrwxrwxrwx) Uid: (197619/ USER) Gid: (197121/ None)
Access: 2016-01-13 12:41:49.035500500 -0800
Modify: 2016-01-13 12:41:49.035500500 -0800
Change: 2016-01-14 09:08:54.416498800 -0800
Birth: 2016-01-13 12:41:49.035500500 -0800
USER@DESKTOP-P014S4E ~
$ ls -l /LOCAL/PATH
lrwxrwxrwx 1 USER None 55 Jan 13 12:41 /LOCAL/PATH -> //REMOTE/PATH
USER@DESKTOP-P014S4E ~
$ stat /LOCAL/PATH/
File: ‘/LOCAL/PATH/’
Size: 0 Blocks: 0 IO Block: 65536 directory
Device: c3h/195d Inode: 2351152405898294425 Links: 1
Access: (0755/drwxr-xr-x) Uid: (197619/ USER) Gid: (197121/ None)
Access: 2016-01-13 12:41:49.035500500 -0800
Modify: 2016-01-13 12:41:49.035500500 -0800
Change: 2016-01-14 09:08:54.416498800 -0800
Birth: 2016-01-13 12:41:49.035500500 -0800
USER@DESKTOP-P014S4E ~
$ ls -l /LOCAL/PATH/
ls: cannot open directory /LOCAL/PATH/: Permission denied
USER@DESKTOP-P014S4E ~
$ cd /LOCAL/PATH
-bash: cd: /LOCAL/PATH: Permission denied
USER@DESKTOP-P014S4E ~
$ cd /LOCAL/PATH/
-bash: cd: /LOCAL/PATH/: Permission denied
Note that stat /LOCAL/PATH/
reports something completely different for Admin:
Admin@DESKTOP-P014S4E ~
$ stat /LOCAL/PATH
File: ‘/LOCAL/PATH’
Size: 1024 Blocks: 8 IO Block: 65536 directory
Device: 38h/56d Inode: 2 Links: 25
Access: (0755/drwxr-xr-x) Uid: (4278190080/Unix_User+0) Gid: (4278190080/Unix_Group+0)
Access: 2016-01-14 01:12:12.000000000 -0800
Modify: 2015-11-19 02:34:42.000226000 -0800
Change: 2015-11-19 02:34:42.000226000 -0800
Birth: -
Admin@DESKTOP-P014S4E ~
$ powershell -Command "Get-Acl C:\PATH"
Directory: C:\
Path Owner Access
---- ----- ------
PATH DESKTOP-P014S4E\USER Everyone Allow Read, Synchronize...
Thanks for any pointers.