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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值