Sitecake changing file permissions after editing on localhost

Hi,

I seem to have a strange issue here, currently I’m developing a site using Sitecake on localhost. Each time i click Publish and exit admin mode, my index.php gets locked for further editing in text editor. I took a closer look and it keeps changing my file permissions.

Is there something perhaps I’m missing in configuration?

Hi, what are your default permissions and what sitecake turns it to?

Hi, thanks for the reply, I managed to solve this issue. There was definitely a file permission problem, because of the way that LAMP stack on localhost handles users.

Hi,

Would you mind sharing the solution please becuase we have the same issue and have been unable to resolve it.

Thanks and regards
Glynne

Hi no problem.

The problem occurred due to our development workflow. We have a team of 3 developers and develop websites locally and deploy them to remote server. We all have Ubuntu machines with LAMP stacks. Since each user has their own credentials on their machines, once you push files to Git repository and someone pulls them to their machine, file ownership remains the same, that means you have the “wrong” credentials and can’t edit the files.

So each time you do the pull from repo you need to change file permissions to make them editable again. That wasn’t good enough for me because it takes an extra step, so we switched our development instances to Vagrant (https://github.com/mattandersen/vagrant-lamp). That way I can setup the project and then other developers clone the Vagrant machines to their PCs. Since these are virtual machines they all have the same credentials and files are always editable.

If needed I can give you a step by step setup process for this. Just let me know.