Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在tmp文件夹中创建的poifiles会有权限问题 #813

Closed
esc233 opened this issue Nov 7, 2019 · 5 comments
Closed

在tmp文件夹中创建的poifiles会有权限问题 #813

esc233 opened this issue Nov 7, 2019 · 5 comments
Assignees
Labels
bug Something isn't working pending verification This problem needs to be confirmed

Comments

@esc233
Copy link

esc233 commented Nov 7, 2019

触发场景描述
在一台服务器不同用户下部署相同的应用
触发Bug的代码
public static void createPOIFilesDirectory() {

    String tmpDir = System.getProperty(JAVA_IO_TMPDIR);
    if (tmpDir == null) {
        throw new RuntimeException(
            "Systems temporary directory not defined - set the -D" + JAVA_IO_TMPDIR + " jvm property!");
    }
    File directory = new File(tmpDir, POIFILES);
    if (!directory.exists()) {
        syncCreatePOIFilesDirectory(directory);
    }

}

提示的异常或者没有达到的效果
在linux下,打个比方在dev执行导出,会在tmp下创建poifiles文件夹,创建用户是dev,同时在test下执行导出,test用户没有poifiles文件夹权限导致io异常,报无权限,导致导出失败

@esc233 esc233 added the bug Something isn't working label Nov 7, 2019
@zhuangjiaju zhuangjiaju added developing This feature will be added in future releases pending verification This problem needs to be confirmed and removed developing This feature will be added in future releases labels Nov 7, 2019
@zhuangjiaju
Copy link
Collaborator

这个比较复杂 需要考虑下。

@esc233
Copy link
Author

esc233 commented Nov 8, 2019

poifiles的文件夹名不要写死就行,比如poifile_dev,不然所有用户都共用一个poifiles,目前是通过777来解决

@javisChen
Copy link

同样遇到这个问题

@zhuangjiaju
Copy link
Collaborator

已经在2.1.3里面解决

@byteGg64
Copy link

我现在使用的4.0.2版本,目前仍然遇到该问题,请问当时的解决方案是什么,是否需要配置一些额外的属性
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending verification This problem needs to be confirmed
Projects
None yet
Development

No branches or pull requests

4 participants