I'm using using TortoiseCVS to access the CVS server. I get the following error:
In D:\source\foo: "C:\Program Files\CVSNT\cvs.exe" -q update -P -d
CVSROOT=:ssh:annan#foo-bar.co.uk:/home/cvsroot
cvs update: failed to create lock directory for `/home/cvsroot/foo' (/var/lock/cvs/foo/#cvs.lock): Permission denied
cvs update: failed to obtain dir lock in repository `/home/cvsroot/foo'
cvs [update aborted]: read lock failed - giving up
Error, CVS operation failed
I had this problem before and managed to fix it, however this time I've not been able to figure it out. I believe it's related to different people committing files with their own ownership.
After reading a few articles online I've tried changing /home/cvsroot and /home/cvsroot/foo to 777 permissions, and recursively changing the ownership of /home/cvsroot/ to cvs:cvs (of which I am a member).
The lock file is being created in /var/lock/cvs/foo/ you should check the permissions of that directory.
Make sure the checkout repository has the permission to checkin the files.
I have checkout the directory
cvs -d #cvs:/files/cvs co vcommon
But this rep doesnt have permission to checkin the files in the package folder.
Problem solved by checking out below:
cvs -d #cvs:/files/cvs/vcommon co package
I had an issue where my account had not been added to the "users" group. So even though permissions looked good, I still wasn't able to checkout any repositories. Once I was added to the users group, it fixed everything.
Related
I am using Centos 7.5
I installed cvs and cvs-inetd using yum
I followed the steps from https://www.linuxfromscratch.org/blfs/view/5.1/server/cvsserver.html
Started xinet services and all seems to work.
But when I try to create anew repository. It fails
$ cvs import -m "test repo" test_proj HEAD MAIN
I test_proj/test_proj/test.o
cvs import: cannot make path to /opt/cvs/test_proj: Permission denied
cvs import: failed to create lock directory for `/opt/cvs/test_proj' (/opt/cvs/test_proj/#cvs.lock): No such file or directory
cvs import: lock failed - giving up
cvs import: Importing /opt/cvs/test_proj/test_proj
cvs import: ERROR: cannot mkdir /opt/cvs/test_proj/test_proj -- not added: No such file or directory
No conflicts created by this import
The same error when I copied old CVS repo in to /opt/cvs and try to checkout.
What am I doing wrong? Any idea?
Permission is denied because the user you have logged in don't have the permission to create new file in /opt/cvs/* so just be a super user and perform the action like:
sudo cvs import -m "test repo" test_proj HEAD MAIN
I did not find the exact root cause but the figured out something to do with SELINUX security. I turned off SELinux on /etc/selinux/config
SELINUX=disabled
Then rebooted the server and all worked like a magic. Checkout and adding new repo works now. I am good with turning off the security for now. Since these components will be migrated to git and this server will be upgraded.
This solution is not recommended for anyone who is intended using CVS permanently.
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.
when I login with root user and go to the working directory (/home/gitproject), I have no issue running commands but when I login to the server with other users I get the following:
fatal: not a git repository (or any of the parent directories): .git
How to resolve this issue?
the repo is not owned by root it is owner by another user and even when I use that user to login I get the same error!
It's hard to know exactly what's wrong here, but here are some advice on how to debug this. git does not find a the structure for a repository where you are, which means that it is unable to find either /home/gitproject/.git or /home/.git or /.git.
This may be because the files are missing or because only root can read them. Check with the users which do not work using the following command:
ls -l /home/gitproject/.git
(and so on).
On a side note, as larks mentioned in a comment, sharing a git repository is going to be a huge pain. Try gitolite or other projects of this kind.
so I solved the issue ...
with root user I ran this command
rm -r .git
and logged in with another user and ran this:
git init
git remote set-url origin URL
It solved the issue. But still not clear what really happened there.
I am creating an embedded Linux application. I am managing all of my source files in Git, including the Linux Kernel source, root file system (rootfs) source, the roofs itself, my application source and all its dependent libraries. My rootfs is owned by root and forces me to use sudo whenever i am updating it. For starters, I suspect that i'm not doing this the right way. I am using Git flow and up until now i have been committing to the development branch. I have had issues with Git and the root owned roots and got around these by using sudo on the affected git commands. Again, I though that this must be incorrect, but I wasn't sure what else to do. I now want to merge the master and development branches. I did a checkout of the master branch and got lots of warnings such as:
warning: unable to rmdir libs/lib: Directory not empty
...
warning: unable to unlink /system/rootfs/bin/busybox: Permission denied
...
The first example is a Git module.
The second example is a root owned file in rootfs.
I then found instructions which suggested I should merge master into development. So I tried to do another checkout back to development. Using sudo, I got the following error:
error: The fowlloing untracked working tree files would be overwritten by checkout:
system/rootfs/bin/busybox
...
Aborting
My question is, firstly, how can I get back to my development branch. And secondly, what is the correct way to manage my rootfs in Git? Thanks.
I'm having trouble setting up my svn. I used apt-get install subversion to install the software. The default svn folder was /home/svn/ I changed the ownership of the folder to an administrator account (not root) and a subversion user group I setup. I set the folder permissions to 0760 recursively through all the subfolders.
Yet whenever I try connecting to the repo I get this: "Commit failed (details follow):
Can't open file '/home/svn/bftc/format': Permission denied".
I have no idea what's wrong!
Make sure your user has execute permission on any folder. 770 should work for you (as Newton Falls pointed out) as this will allow group execute.
If your svn repository is owned by a group that you are not in, then 770 will not work. You have to be part of the group, or change permissions to 777. The former is preferable.
How have you set up the repository access? Does your user have permissions to access your repository? If it is via the svn access file you may want to check the user permissions.