[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: silencing cvs



On Tue, 2002-06-11 at 13:29, Charles Menzes wrote:
> files written by the tftp daemon have 666 permissions and owner/group of 
> nobody. the script that i have which begins the process of pulling down 
> the file through tftp is ran as another user, 'charles' for example.
> 
> once the file has been fetched, and resides on the server, the current 
> user then runs a 'cvs diff router.test' and then commits the file using 
> 
>  cvs commit -m "change made blah blah" router.test
> 
> this works well, however since the file was written with ownership outside 
> of the current user, i get the following error:
> 
> cvs commit: cannot change mode of file router.test: Operation not 
> permitted
> cvs commit: cannot change mode of file router.test: Operation not 
> permitted
> 
> i understand how this is causing an error, however the rcs files seem to 
> be updated correctly, and the files being owner/group as nobody/nobody is 
> fine. is there a way to simply quiet down cvs on this note? or am i 
> missing a problem that may cause issues?

Here's one way.  It assumes that the working directory is owned by the
user.

cp router.test foo && \
  rm router.test && \
  mv foo router.test && \
  chmod [XXX] router.test

[XXX] is the mode of router.test,v in CVS.  The first three lines amount
to "chown [user] router.test" without the benefit of root privilege, and
should make it possible for you to do the chmod.  The "&&" thing ensures
that a single failure along the way causes the whole process to abort,
which minimizes the possibility of data loss.

Here's another way:

chmod 666 [cvs-repo-path]/router.test,v

You only need to do this once.  Obviously, this has security
implications, so you need to make sure that's what you want.


-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.