I am unable to delete ‘test/deployment/sandbox-v2/tmp/dns’ after deleting the github repository 'test'. I am unable to reclone it in my CentOS system. Even after recloning in other folder,running site.yml file of sandbox fails at logs. So i'm trying to completely remove test repository and reclone it for fresh run. I have tried all ways and commands to remove it, it gets removed as well but then gets recreated automatically with this file mentioned. Any clue how to completely remove it and clone a fresh repo.
It's hard to say but if this was bind-mounted into a container and that container was running its process as root (uid 0) then files it created would be owned by uid 0 even outside the container. Gotta get your sudo on.
Is dns a symlink to something within /etc that the user has no right to modify/delete?
If you go into the "test/deployment/sandbox-v2/tmp/" and do "ls -l" what does it say?
If the file is a symlink, unlink it with "unlink dns" and now you should be able to delete the file structure from the "test" directory.
Related
Over the weekend I had to performed a fresh install on Ubuntu on my laptop.
I was restoring my files from my backup, but I used the wrong username.
I've tried to change the username and the $PATH but I'm still getting the same error
t0m#asuntu:~$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
=> Downloading nvm from git to '/home/ubut0m/.nvm'
=> mkdir: cannot create directory ‘/home/ubut0m’: Permission denied
ls: cannot access '/home/ubut0m/.nvm': No such file or directory
fatal: could not create leading directories of '/home/ubut0m/.nvm': Permission denied
Failed to clone nvm repo. Please report this!
t0m#asuntu:~$ vim .bashrc
t0m#asuntu:~$
I've tried removing and reinstalling everthing (NPM, Node, NVM), but don't know why I can't get the script to work. Any help is appreciated.
Check that you're $HOME environment variable matches that of the user you are currently running as, which you can check with whoami. Sometimes, some tools that elevate privileges (such as sudo) preserve the old user's home directory environment variable while running as the new user.
If that's not the problem, check that your home directory exists and has the correct permissions. Usually, if that's the problem, all sorts of other issues pop up (but I can understand a tendency to ignore such things on a newly restored machine).
If it's neither of those things, you can try making sure that you are in your home directory when running the wget | bash command although that really shouldn't be necessary (and if that turns out to be the issue, I would definitely file a bug with nvm about it).
Jenkins was running all fine on a RedHat Linux machine (a clean EC2 machine on AWS), until I decided to change the JENKINS_HOME. I simply moved the Jenkins directory from /var/lib/jenkins to /home/ec2-user/jenkins and then created a symlink. (I followed the first answer to this question: Change JENKINS_HOME on Red Hat Linux?).
However when I restart Jenkins I get the error:
Unable to create the home directory ‘/var/lib/jenkins’. This is most
likely a permission problem. To change the home directory, use
JENKINS_HOME environment variable or set the JENKINS_HOME system
property.
I tried changing JENKINS_HOME in /etc/sysconfig/jenkins, setting it to the new folder (which I suppose defeats the point of a symlink?) and I still get the same error
Unable to create the home directory ‘/home/ec2-user/jenkins’.
It is for backup purposes, so that I have all Jenkins data in a mounted external data storage (AWS Elastic File System).
I've figured it out. This error was persisting because the /jenkins/ folder needs to be accessible to user 'jenkins' to run processes, but it couldn't access this folder because it is belongs to the particular logged in user. I changed the mounting to /var/ where jenkins can access as global process, and it solved the problem.
I ran into the same problem, so sharing my solution here:
The user jenkins does not have access to the folder home/ec2-user/jenkins. You can modify the access rights of the folder home/ec2-user/home by changing or adding the user jenkins to owner
sudo chown jenkins /home/ec2-user/jenkins
sudo chmod u+w /home/ec2-user/jenkins
To verify the new ownership, you can do:
ls -ld /home/ec2-user/jenkins
The error seems pretty obvious: "This is most likely a permission problem."
I assume /home/jenkins does not exists, and the user jenkins does not have write permissions in /home. If you moved the Jenkins home, then you probably did it as root and just forgot to update owner permissions.
You would need to create the home, something like this:
sudo service jenkins stop
# make the changes in /etc/sysconfig/jenkins
sudo mkdir --parents /home/jenkins # or mv, in your case
sudo chown --recursive jenkins /home/jenkins
sudo service jenkins start
For school we use git to submit things. Every question here seems to be dealing with GitHub and isnt answering my specific question.
In our lab we were attempting to download the files but the prof was having issues on his end. He was asking me to try some commands etc. Anyways we did this:
ssh csci fork csci/Labs csci/$USER/Labs
git clone csci:csci/$USER/Labs
And it worked but the files had issues or something. He said he will get the sys admin to fix it. Then today he told me I need to delete my version on the server and just do it over again. I asked if I can just rm -r the folder but he said I need to delete the one on the git server - he said he doesnt know the command but I should be able to look it up.
I tried
git remote remove csci/Labs
but that did not work. I already deleted the local folder (before he told me about it actually) using rm -r Labs, and saying yes to the delete this git file warnings or whatever. So Im not sure where to go from here to delete it.
A repository is just a directory with working copy (though it is optional) and .git, so deleting the directory deletes the repository. To delete a remote repository you need to have access to the remote filesystem.
Try to run which should work also.
rm -rf .git
I am on Fedora 17 trying to use svn version 1.7.6
I have created a repository at /home/el/svnworkspace and I checked out a working copy in /workspace
I am getting this error when I use the command:
[root#defiant workspace]# svn remove TestProject --force
Gives the Error:
svn: E155035: '/workspace/TestProject'
is the root of a working copy and cannot be deleted
The error message is partially right, TestProject was a root before. But I deleted it and now /workspace the root. So somehow it is confused. I no longer want TestProject to be a root, and I want workspace to be the root. svn is confused, and I want to unconfuse it, maybe one of you know the proper wizard incantation to remove /workspace/TestProject as a root of a working copy? I just want it to be a normal folder again.
Perhaps the only way for me to fix it is to blow everything away and re-add everything. Maybe a resident wizard knows a better way.
SVN does get confused about directories sometimes.
Unless you have a lot of changes you need to check in, I suggest removing the hierarchy in question from your filesystem (rm -rf), and checking out again starting from wherever looks appropriate. This always seems to handle SVN directory confusion for me.
I was able to fix the problem with these steps:
Make sure nothing has a lock on the files in question, for me: Eclipse IDE. So close any IDE's or Editors that might have a lock on the file.
Make sure you have write permissions on the working copy as well as the repository.
chmod -R 775 /workspace
chown -R your_user_name.your_user_name 775 /workspace
chmod -R 775 /home/el/svnworkspace
chown -R your_user_name.your_user_name 775 /home/el/svnworkspace
If you are using a program with a GUI like rapidsvn to add/remove/commit files, turn that off and use only the command line svn command. The GUI might have been have been conflicting with what I was trying to do on the command line.
finally, I think this part is what fixed my problem:
Go into the directory that I want to add, but won't add. Manually rm -rf all the .svn files in it. Then try to svn remove it then svn add it. It successfully adds and then I could commit it and all is well.
I can do checkouts, update and such. But when I try to commit changes, SVN gives me the following error:
Can't open file '/svn/p/pokemonium/code/db/txn-current-lock': Permission denied
I am using Windows 7 x64 SP1 with latest version of TortoiseSVN.
UAC is off, my account has read and write access, etc.
I can commit fine to other svn repositorys.
For me it ended up being a permissions issue on the server. I have my repo on a linux box, and ssh in to use svnadmin. For convenience sake, I had executed my create repository command as root. I was looking to get source I had on my Windows box into the repo, so was using TortoiseSVN to set up trunk/branches/tags. The directory containing the repo on the server was owned by root, and Tortoise was coming in as apache. I chowned the directory on the server to apache:apache, and it all went smoothly.
chown apache:apache -R my_repo_root
This is a server configuration issue. On windows host Visual SVN server runs under NETWORK SERVICE account by default. I solved this problem by granting full access rights to the repository folder to this account. Another option is switching Visual SVN service to the SYSTEM account, but that could pose a potential security risk.
Try this.
Make a back up copy of your working copy (just to be safe).
Make another copy your entire working copy off somewhere else.
Take the copy and delete all of the SVN folders out of it
Delete your working copy and do a fresh checkout
now copy/paste your corrupted working copy over your fresh checkout.
it is critical for this to work that you have completely removed ever _svn or .svn folder from your corrupted working copy before you perform the copy/paste.
This will leave you (hopefully) with a working copy that shows (!) on all the files you had modified since your last commit. And fixes your lock issue.
I had the same problem after I re-installed Windows 7 and just copied the SVN Repository from the old Windows to the new one.
After trying the steps that Mr. Manager proposed, the problem was still not fixed in my case.
After making sure that the permissions was setup correctly for the SVN Repository folder I just deleted the file 'txn-current-lock' in the /db folder of the project. That fixed it for me. From thereon I could commit my project again.
I had faced same issue on Unix box
Restarting the Apache service of the SVN server solved myproblem.
-f httpd.conf -k stop
-f httpd.conf -k start
In my own case, my linux server had been restarted after a power loss. The file system remained mounted as read-only since some journal repairs had been made. Rebooting the machine restored full function.
permissions worked for me too
error
repo/db/txn-current-lock: Permission denied
fix
chown apache:apache -R my_repo_root