Windows 7, update.packages problem: “unable to move temporary installation”?

I found that the problem indeed is the antivirus “real time file system protection”. I do the following to fix the problem: trace(utils:::unpackPkgZip, edit=TRUE) I edit line 140 (line 142 in R 3.4.4): Sys.sleep(0.5) to: Sys.sleep(2) I seems like the antivirus stalls the creation of the package tmp dir. After changing it to 2 seconds … Read more

Automatically apply “git update-index –chmod=+x” to executable files

git 2.9.X/2.10 (Q3 2016) brings chmod to git add itself! See commit 4e55ed3 (31 May 2016) by Edward Thomson (ethomson). Helped-by: Johannes Schindelin (dscho). (Merged by Junio C Hamano — gitster — in commit c8b080a, 06 Jul 2016) add: add –chmod=+x / –chmod=-x options The executable bit will not be detected (and therefore will not … Read more

shutil.rmtree fails on Windows with ‘Access is denied’ [duplicate]

Check this question out: What user do python scripts run as in windows? Apparently the answer is to change the file/folder to not be read-only and then remove it. Here’s onerror() handler from pathutils.py mentioned by @Sridhar Ratnakumar in comments: def onerror(func, path, exc_info): “”” Error handler for “shutil.rmtree“. If the error is due to … Read more

Checking for directory and file write permissions in .NET

Directory.GetAccessControl(path) does what you are asking for. public static bool HasWritePermissionOnDir(string path) { var writeAllow = false; var writeDeny = false; var accessControlList = Directory.GetAccessControl(path); if (accessControlList == null) return false; var accessRules = accessControlList.GetAccessRules(true, true, typeof(System.Security.Principal.SecurityIdentifier)); if (accessRules ==null) return false; foreach (FileSystemAccessRule rule in accessRules) { if ((FileSystemRights.Write & rule.FileSystemRights) != FileSystemRights.Write) continue; … Read more

openssh windows bad owner or permissions

This started popping up immediately after I created another user with Administrator privileges, and that account began inheriting access to my .ssh folder. You do not need to change your permissions whatsoever. Just go to .ssh, right-click Properties, Security Tab, Advanced. DISABLE INHERITANCE, then click on the Administrator user (the one that is not you) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)