Jishad P
Jishad P

Reputation: 703

Git Permission Issue in Terminal

  1. Team Lead Created A repository
  2. Pushed Two files with permission 655 and 755 respectively.
  3. Clone the repository by another team member A by terminal.
  4. Trying to edit the file in sublime text and its showing permission denied message upon saving.
  5. gave 777 permission to folder with recursive mode and finish the editing
  6. Push the changes by team member A and completes
  7. Team Lead pull the changes via terminal,got the latest file and again changed the permission to 755.
  8. Only work on file after making the permission to 777.

Why this happening like this in ubuntu ? The permission switching is making problems for me.. Any Idea for recovering this issue ?

Upvotes: 1

Views: 1647

Answers (1)

Jeff Puckett
Jeff Puckett

Reputation: 41021

Git actually doesn't keep track of permissions set on files except for the executable bit.

Since you cloned the repo as root, then root is the owner and the only one that can edit the files.

Change ownership to your username

chown -R <username> <project_directory>/

Upvotes: 5

Related Questions