0

So I find myself being forced to use a Windows machine just because thats what the financial institution feels is more secure for an outside contractor.

I am using powershell and I just received some svg assets from their in-house designer which I committed and pushed in the branch I was working in and then attempted to merge into another branch when I got this error:

error: cannot stat 'media/images1': Permission denied

Now I can't even checkout into the other branch where I started this work and I cannot even do a cd into media/images1 one to take a look at what kind of permissions these svg files have.

So I am wondering if someone could guide me as to how does this even get done where you deny someone the ability to run a git pull, cd or even git checkout <other-branches> just because you do not have permissions with these files?

Even better still, who would I typically ask to rectify this in a company? Whose job would it normally be to even do this?

Daniel
  • 219
  • 1
  • 4
  • 14
  • Do you have credentials to clone this repository? Then you can clone the entire thing into your home directory, or somewhere else you can have full control of the files that comprise the repo and the working tree. – John Mahowald Aug 28 '20 at 04:05
  • @JohnMahowald, I do have credentials to clone the repo. That's whats strange or at least I have never experienced before. Although the `woff` files and `svg` files did not come from the repo, it came from a colleague and after I added it to the project and pushed it and then switched over to another branch, thats when I started getting these errors. – Daniel Aug 28 '20 at 05:09
  • Is the other person altering files in your working tree? That's not needed for git, where they can commit to their repo, and you can fetch from it. Check the file permissions. What file system is the storage, NTFS ? – John Mahowald Aug 28 '20 at 14:58
  • @JohnMahowald, no the person who handed me the assets is not altering anything, but it might have been altered by someone somewhere who manages file permissions, probably as a way to stop a random user from pulling these assets and using them on their own website, which is odd as these repos are not public. I cannot check the file permissions, at least not from powershell, anything I do now in that branch I keep getting permission denied ever since I dropped those assets in there. – Daniel Aug 28 '20 at 17:27
  • @JohnMahowald, weird, this afternoon I am now able to do a `git checkout` to the original branch I was working in and I ran a `Get-Acl` from the folder with the assets I supposedly had no permissions to and now I get ` CORP/ NT AUTHORITY\SYSTEM Allow FullControl...` Yesterday it would not even let me leave that other branch. I was held hostage there just because I had no permission to those assets. – Daniel Aug 28 '20 at 17:39

1 Answers1

0

Talk to a desktop person, rather than speculate on their intent. Together look for access control policy that might have denied access:

  • You the user altered some file permissions
  • Administratively applied ACLs such as via Group Policy
  • Security controls that are capable of blocking file access, like endpoint agents, possibly data loss prevention related

Discuss the use case of git needing access to the repo and working directory. As it is tracking the history of the entire thing.

Establish a directory where git repos go. Could be "Documents" or anywhere else you can write. Might have to be allowed if it was being denied by policy like you suspect.

Consider asking for a Linux development environment, VM or WSL or laptop, if that would make you more productive. Side-steps NTFS problems with a Linux file system. Maybe not technically necessary when git on Windows is decent. Might not be allowed if the organization cannot support it.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • Thank you for this answer. By the way its not about speculating on intent, its that the business end of this institution has sliced, diced and rearranged developer departments so much, that a lot of knowledge left when disgruntled developers left. The people left behind are all PMs and brand new developers. It took a while but there are now more senior people who are still around that finally appeared once we learned who to go to for help. This is where your bullet points come in handy in a situation where nobody knows who is in charge of what or where to go for what permissions. – Daniel Aug 30 '20 at 01:18
  • By the way the `permission denied` errors went away the following day, I have no clue what happened but then again its Windows. By the way regarding asking for a Linux or Unixy environment, yeah we have been asking for it for months and supposedly it was coming, still waiting for it. – Daniel Aug 30 '20 at 01:19