Cruisecontrol, deployment, folder permissions - cruisecontrol.net

We're using cruisecontrol.net, it builds the version, creates a zip file, then 15 min later, unzips the file on the Integration server. But when the folder gets to the integration server, often, the security permission on one of the folders is totally hosed. The Domain admin and folder owner can't even open the folder in explorer. We reboot and the folder permissions are good we can delete the folder and redeploy the zip file and it's okay.
Does anyone have any idea what or how the folder permissions are getting so messed up?
Any tools to use to diagnose/watch what exactly is messing it up?

Have you tried using psexec from system internals to upzip to file on the remote machine rather than the build machine?
Also, it seems to me that rather than unzipping the zip just copy the stuff directly to the remote server. I'm not seeing the reason to zip it and then just unzip it?

Related

Perforce messes up symlinks

When I download source code from perforce, the symlinks gets downloaded as files and the project, of course, doesn't build. This happens on certain computers and virtual machines but the same symlinks download fine on other computers.
The download file is often a short file which just contains path of the linked file instead of being zero byte symlink file.
This actually had to do with user permissions on windows, not so much with perforce. The problem is that the user doesn't have permission to create symlinks so perforce ends up creating a file (In my opinion, it should generate an error message instead of converting the symlink to file).
The simple solution in most cases should be to start P4V as administrator and then download the source code. You may have to force it to download everything since it will not re-download wrong symlinks because those objects already exist on disk.
You can check if you have permissions with the following command. More here.
mklink <linkFile> <ExistingFile>
Note: you may well be able to create symlinks (=shortcuts) using File Explorer but it's the command line (above) that will determine if you have the privileges or not.

Database folder on development mode

On arangodb's documentation it is suggested to use a different folder to databases during development phase (/tmp/fancy_db). I try to use this but I get errors saying that no database exists... How can I create databases on this temporary folder?
Thank you
arangod will not create any folder for you, you have to give it an existing folder on your system.
/tmp/fancy_db
is just a suggestion you can use any folder at any location on your machine.
However to create a folder in /tmp on a unix system open a terminal and enter:
bash> mkdir /tmp/fancy_db
On a windows system (as far as i know) \tmp is not available, you can use
C:\tmp\fancy_db
instead (create it with Explorer)

How to deploy a WAR file on Linux machine

I have a Linux Machine. Apache server is running and I need to deploy my project which is a .war file developed on Windows machine.
Can someone give me bit idea how to do that?
if you have FTP or SCP access to the directories where Tomcat is installed, you should be able to simply copy the generated WAR file to the tomcat/webapps directory. Tomcat will automatically deploy the war for you.
When redeploying, I find it safest to delete the original .WAR file in Tomcat, and tomcat will automatically destory the exploded directory for you. When that's done, copy up the .WAR file.
Finally, make sure you copy the .WAR file "all at once". If you have a slow upload, Tomcat will try and deploy the .WAR file even though it has not completely been uploaded yet. This will lead to a partial or unsuccessful deployment. It's best if you upload to a neutral directory (home directory, temp, whichever), and then either rename (using mv) the .WAR into tomcat, or simply copy it there using the local file systems copy command. Much faster than the upload. Safest way is to mv the file from the same filesystem.
All of this assumes you do not have any of the manager or admin ports open for Tomcat, as it provides mechanisms to remotely deploy applications directly.
But, in truth, simply removing the old app and slipping in the new app works simply and well for many applications.

tortoise svn delete local file

i am new to tortoise svn, and im working on a group project. the main files are located on a separate server. how can i delete any working folders on my machine without affecting the files on the server?
Deleting your local working folders would never delete the files in svn server unless you do an svn commit to the server. So you can safely delete the working folders on your machine
You can delete the folders/files on your machine - as long as you don't tell SVN the server will never know. Which means - just don't Commit and you should be fine.
When i'm learning an new source control system, i usually will zip the local directory before i delete ... just incase i screw up. Then after i'm sure i didn't screw up I stop doing the zips.

Not able to delete directory

I am having a frequent problems with my web hosting (its shared)
I am not able to delete or change permission for a particular directory. The response is,
Cannot delete. Directory may not be empty
I checked the permissions and it looks OK. There are 100's of files in this folder which I don't want.
I contacted my support and they solved it saying it was permission issue. But it reappeared. Any suggestions?
The server is Linux.
You can't rmdir a directory with files in it. You must first rm all files and subdirectories. Many times, the easiest solution is:
$ rm -rf old_directory
It's entirely possible that some of the files or subdirectories have permission limitations that might prevent them from being removed. Occasionally, this can be solved with:
$ chmod -R +w old_directory
But I suspect that's what your support people did earlier.
This could also be because your FTP client might not be showing the hidden files (like cache, or any hiddn files that your application might create), while the hidden files are preventing you from deleting the directory. (though, in your case, I am not sure if this is the cause .. .it could be permission issue with your hosting provider.. Webserver running as another user (like apache or www) combined with your directories having global write perms).
I assume that's a response from an FTP server?
Usually, a message from an FTP server really means it. If it says the directory is not empty, there might be certain files you cannot see that exists in the directory which maybe one of:
Your PHP/JSP/ASP/whatever scripts may run under a different user account thus creating files which you may not be able to see/delete
Is your hosting's web interface run under your FTP account? There might be conflicting permissions there if you manage some files from the web interface and then later via FTP.
Hosting server/operating system files created unintentionally e.g. from the hosting's web interface
If it comes from a script, write a one-time throw-away script that delete the files and that directory and then uploads and executes it.
And just to be sure, some FTP server doesn't support direct directory deletion, you need all the files first, is that the case?

Resources