mklink access denied but explorer succeeds - windows

Trying to create link on file share using:
mklink /D "\fileshare\dest\folder_link" "\fileshare\dest\folder"
(under Admin)
But it gives access denied, tried to run fsutil, but no success :(
fsutil behavior set SymlinkEvaluation R2R:1
C:\Windows\system32>fsutil behavior query SymlinkEvaluation
Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are enabled.
Remote to remote symbolic links are enabled.
However when I try to create link via explorer ( right clicking, selecting Create shortcut )- it works.
Why command line doesn't not work, but explorer does ?
Is there an alternative way to create soft links via cmd?

So it appeared to be GPO policy for linking not set on the machine that was hosting the fileshare.
secpol.msc, Local Policies\User Rights Assignment\Create symbolic

Related

IIS Express directory browsing

I know this question has been already asked but it didn't work for me.
When I run the command:
appcmd set config /section:system.webServer/directoryBrowse /enabled:true
I have the following error:
The command appcmd was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default.
At his point I don't know what to do. How can I run the command?
I would try it at the site level first, Run with elevated permission i.e. Run as Administrator
Enable directory browsing at the site level
cd "C:\Program Files (x86)\IIS Express\"
run this appcmd.exe set config "Contoso Some SITE NAME" -section:system.webServer/directoryBrowse /enabled:"True" /showFlags:"Date, Time, Size, Extension"
check to turn off encryption and read only in folder options
Note: Run with elevated permission
GUI version from Microsoft site for other versions:
On the Start screen, move the pointer all the way to the lower left
corner, right-click the Start button, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn
Windows features on or off.
Expand Internet Information Services,
expand World Wide Web Services, expand Common HTTP Features, and
then select Directory Browsing.
Click OK.
Click Close.
If it still does not work, then try & delete all the IIS cache and repeat the above
I previously answered this, and it works well here for the majority of people
Open CMD prompt & Navigate to IIS express - by typing the following
cd "C:\Program Files (x86)\IIS Express\"
run this appcmd.exe list site /xml | appcmd delete site /in
This will delete all the sites, enjoy!

Microsoft Azure Symbolic Link Storage folder Laravel

I am using laravel 5.3 on Microsoft Azure web server...
I am having an issue creating a symbolic link between my /public/storage/ and /storage/app/public/ folders
I do not have the required permissions to create a symbolic link, and I have also tried to use the following command:
php artisan storage:link
Which automatically creates a symbolic link, however it gives the error:
Access is denied.
I have tried to also run the command:
mklink /d "D:home\site\wwwroot\storage\app\public\" "D:home\site\wwwroot\public\storage\"
And the error is something along the lines of:
You do not have sufficient privileges to perform this operation
How can I run command prompt in Microsoft Azure in elevated administrator mode so that I can actually create a symbolic link...
Please help.
Thanks!
Creating symlinks is something that is blocked by the Azure Web App sandbox. You can read more about it here.
If you consist to create symlinks, you can try to leverage Azure VMs.

mklink error on domain connected machine but valid symlink still created - "the system cannot find the file specified"

On domain connected Windows 10 and Windows 8.1 machines (issue may not be version specific), running mklink symlinkToCreate.txt originalFile.txt is producing an error The system cannot find the file specified. The symlink is still created correctly.
I have made sure that originalFile.txt does exist and that symlinkToCreate.txt does not already exist. I have also tried using absolute paths for both parts instead of relative paths. I am using an elevated command prompt as I know that only elevated Administrators can create symlinks by default. I have also checked the Create symbolic links local policy and confirmed that this is just set to Administrators.
Directory link creation also produces the error (mklink /D). Hard link creation, however, works fine (mklink /H).
Weirdly, I get the same behaviour even when logged in using the local Administrator account. I also get the same behaviour on a different machine in the same domain. The exact same commands work perfectly on a non domain-connected machine.
Given that mklink is built into cmd and that the file I'm linking definitely exists, I'm stumped as to what file the system cannot find, though I strongly suspect that the actual content of the error is a red herring. Shame there doesn't seem to be a mklink debug mode!
Any pointers greatly appreciated as I'm banging my head against a wall with this one.

Access is denied on mklink

I am trying to get a symlink working over a network drive.
I have already tried suggestions on questions already asked, such as running as administrator and checking if the directory already exists. Unfortunately it still gives me the following error:
C:\Windows\system32>mklink /d \\myserver\someLink \\myserver\mydir
Access is denied.
Any ideas how I could get this working? The local machine is running windows 7 and the remote machine is running windows server 2008 R2 standard.
I jumped through all the hoops:
Create a non-admin account (in my case, activated the guest account).
As Admin, run secpol.msc and grant this account Create Symbolic Link permissions.
runas /user:guest cmd to open a command window as the guest.
only to get caught on the simplest problem: because I was running as guest, I didn't have write permissions within the directory. So,
As admin, change permissions in the target directory (where you want to make the link) to give write access to the non-admin user.
I had this while I wanted to create a hard link with mklink /H ....
By removing the /H, the error vanished as well.
So if a symbolic link does the trick for you as well, you should try this.
This is a little silly, but make sure you're using /D (soft) or /J (hard) for directories or you'll get access denied.

Permissions and SVN Updates on Windows Server 2008: same folder & SVN account, different Active Directory users

We're experiencing strange permission issues with SVN after switching from Windows Server 2003 to Server 2008.
On our standard build box there is a folder (C:\SVN_Code_Folder) which AD_User_A associates with a SVN repository using SVN_User and TortoiseSVN 1.7.6
When using Windows 2003, when AD_User_B logs into the box and tries to Update, Switch, Merge the SVN_Code_Folder with SVN_User, the command is executed.
It Windows 2008, it fails with the message:
Command: Update
Error: Working copy 'C:\jboss-4.2.3.GA\server\New folder' locked
Error: sqlite: attempt to write a readonly database
Error: sqlite: attempt to write a readonly database
Completed!
Attempting to unlock the file, which was never locked, via the context menu is met with the following message:
There's nothing to unlock. No file has a lock in this working copy.
I've played with the permissions of the folder and I've discovered that giving "Domain Users" control over the folder fixes the issue, but I would prefer to not have such a broad permissions. I've tried granting the same permissions to individual users and a SVN-group, but these too did not work.
What am I missing?
Is this an improper use of SVN?
Can 2 different Domain users update a folder using SVN without removing the .SVN file?
For future reference...
I had this same problem with some WC's that I copied over to my new laptop's hard drive, from a file share on my old machine.
It turned out that the problem was solved by giving myself (as opposed to all domain users, or any other group) full control over the folder.
Did you check the svn service user on the win2008 machine?
Does that user have local administrator privileges and also have permission to these folders on c:?
After changing anything restart the service.
For me change folder permissions did't help, but I have update for several directories in a batch script so I solved this by
cmd -> Run as administrator -> start update script

Resources