File permissions error after clone


I have a multitude of web applications that are mostly based in PHP and have quite a deep file/directory structure. Upon making new repositories with SourceTree and Bitbucket and then cloning to a live server all my file and directory permissions have been ignored and changed rendering my web applications useless.

I've read around this topic and found that essentially SourceTree/Bitbucket/Git etc believe that file permissions are irrelevant. How on earth that is an answer to it I have no idea as file permissions can be the death of web applications if not kept intact.

My only work around so far is to do a full recursive chmod on an entire file structure which is just downright ugly. I would like to find out how to retain them throughout any process with sourcetree and bitbucket.

NB - This post has been edited and previously mentioned wordpress. Regardless of the code base a repository uses this issue is still pertinent. And I retract my quote of 30% (apologies) its something more like 18% which is still not to be sniffed at.

1 answer

This is the Atlassian user forum, so i think you are barking up the wrong tree here.

On a side-note, why does so many people ask WP questions here? Does wordpress have a link to Atlassian questions or something?

I'd say because over 30% of the entire internet is WordPress and it kind bleeds out on everything web related.

Its not necessarily a wordpress question I'm asking. More the fact that SourceTree in ignoring the file permissions and changing them when committing and cloning ect.

Ah, this again.

@Jonas Andersson - yes, you're spot on.  There are several sites who are documenting their Wordpress hints, add-ons, tricks, suggestions and so-on using Confluence.  A number of the more poorly designed sites don't bother to offer good routes to help, support or forums, so people looking for help end up landing on the Confluence footer, which in turn lands them here. 

This, of course, begs the question of why they're not using Wordpress to do their docs, but that's a different conversation.

@Mike Garlick - 30% is a vast exaggeration, but that's not important here.  You have a very good question, and it deserves attention from the community, as it's not just an edge case related to Wordpress specific executables or scripts.  I am not a Sourcetree user as it doesn't run on Linux, so I really can't help, but, if it is still a problem, I would ask the question again.  But change it slightly:

  • Do not label it with Wordpress
  • Absolutely need to label it with Sourcetree
  • Expand on what "access wp-admin" means.  Assume the audience doesn't know what that is at all (is it a script/executable/page to run?)


@Nic Brough [Adaptavist] - Duly noted and edited.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

281 views 38 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot