CVS keeps changing file permissions; why does it do that?
来源:互联网 发布:数字图像处理经典算法 编辑:程序博客网 时间:2024/05/29 19:03
In general, CVS doesn't do a very good job of preserving permissions onfiles. When you import a project and then check it out, there is noguarantee that the file permissions in the new working copy will be thesame as when the project was imported. More likely, the working copyfiles will be created with the same standard permissions that younormally get on newly created files.
However, there is at least one exception. If you want to storeexecutable shell scripts in the project, you can keep them executable inall working copies by making the corresponding repository fileexecutable:
floss$ ls -l /usr/local/newrepos/someproj
total 6
-r--r--r-- 1 jrandom users 630 Aug 17 01:10 README.txt,v
-r-xr-xr-x 1 jrandom users 1041 Aug 17 01:10 scrub.pl,v*
-r--r--r-- 1 jrandom users 750 Aug 17 01:10 hello.c,v
Notice that although the file is executable, it is still read-only, asall repository files should be (remember that CVS works by making atemporary copy of the RCS file, doing everything in the copy, and thenreplacing the original with the copy when ready).
When you import or add an executable file, CVS preserves the executablebits, so if the permissions were correct from the start, you havenothing to worry about. However, if you accidentally add the filebefore making it executable, you must go into the repository andmanually set the RCS file to be executable.
The repository permissions always dominate. If the file isnonexecutable in the repository, but executable in the working copy, theworking copy file will also be nonexecutable after you do an update. Having your files' permissions silently change can be extremelyfrustrating. If this happens, first check the repository and see if youcan solve it by setting the appropriate permissions on the correspondingRCS files.
A feature called PreservePermissions
has recently been added toCVS that may alleviate some of these problems. However, using thisfeature can cause other unexpected results (which is why I'm notrecommending it unconditionally here). Make sure you read the nodesconfig and Special Files in the Cederqvist before puttingPreservePermissions=yes
in CVSROOT/config.
- CVS keeps changing file permissions; why does it do that?
- chmod: changing permissions of '/etc/passwd': Read-only file system
- chmod: changing permissions of ‘/etc/passwd': Read-only file system
- What Is UAT, And Why Do It?
- File permissions: why can't I list a directory?
- Why do users find bugs that Software Testers miss ?
- That does it! 还是算了吧!
- ofSetVerticalSync– what does it do exactly?
- 错误:chmod: changing permissions of ‘/etc/passwd': Read-only file system
- Functional Programming Is Hard, That's Why It's Good
- File Permissions
- It seems that this file has not been built yet.Do you want to build it now? Codeblocks能构建build不能运run
- It seems that this file has not been built yet.Do you want to build it now? Codeblocks能构建build不能运run
- It seems that this file has not been built yet.Do you want to build it now? Codeblocks能构建build不能运ru
- 流行美语:That does it! 还是算了吧
- it seems that your device does not support camera
- what-is-the-bios-and-what-does-it-do
- What is DMA and what does it do?
- 谷歌与DIRECTV达成合作在电视节目中销售广告
- 很有用的面试知识---面试100问(不仅仅是面试)
- 对不起,NULL指针
- linux在自己的用户目录下安装VIM插件
- poj2488 回溯 注意字典 边缘的处理思想
- CVS keeps changing file permissions; why does it do that?
- HTML5 WebSockets
- 控件Enable=false时字体显示不清晰
- iPhoDroid再度更新 iPhone轻松玩转Android
- VC 键盘虚拟码
- 软件代码设计零碎杂想-6
- 关于"保持 HTTP 连接"和“连接超时N秒"的说明
- ZQU_ACM 协会 DFS
- VC socket编程