TKB00064 Running Teamprise as Root User Causes Problems

Overview

The Teamprise client suite is designed to be run as a non-root user on Unix platforms. This decision was made because of certain Java issues, and because the client suite code has not been audited for security in such an environment.

Specific Problems

Listed below are certain problems you may encounter running Teamprise client suite programs as the root user:

  • Java's File.canWrite() method returns true for all files, regardless of Unix permissions set on the file. Teamprise cannot distinguish a "read-only" file from a "writable" file when this happens. This causes problems during check out and check in.

Workarounds

Run Teamprise client suite programs as a non-root user.

 

 

在jdk5中对文件的操作,setReadOnly()设置为文件的只读。在window上是没问题的。

当发布在aix上去时,发现

public class FileTest2 {

	public static void main(String[] args){
		try{
			File f =new File("/home/ids/srcinput/55/live/AUTO_IDS_20121031095112_CreatePolicy_7030100_220397772.xml.end");
			f.setReadOnly();
			System.out.println("canWrite="+f.canWrite());
			System.out.println("canRead="+f.canRead());
		}catch (Exception e) {
			System.out.println(e);
		}
		
	}
}
  结果还是为true

你可能感兴趣的:(TKB00064 Running Teamprise as Root User Causes Problems)