English 中文(简体)
Make a folder in SVN writable so that when the repo is checked out, the permissions are already set to writable?
原标题:

I m not a Subversion pro by any means. But I am using it for my coding projects and using the deployment feature at springloops.com (love it).

I have some log, cache and image folders that I routinely need to make writable on new deployments or new projects. Is there a way to make it so that when deploying or downloading, the folder permissions will already be set to 0777?

最佳回答

Unfortunately, Subversion doesn t support storing permissions. According to this discussion (Nabble "Unix file permissions" (external link)), however, one can use svn properties and a little bit of shell scripting.

To store the properties in subversion:

$ svn propset owner username aFile 
$ svn propset group groupname aFile 
$ svn propset mode filemode aFile

To later re-apply the file permissions:

$ chown `svn propget owner aFile`.`svn propget group aFile` aFile
$ chmod `svn propget mode aFile` aFile
问题回答

svn can t store file (or folder) permissions, so I m afraid your only option is to write a script to make the task a little less tedious.

When you check out a working copy, by definition you have write access to the whole working copy.





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签