RFR: 8322881: java/nio/file/Files/CopyMoveVariations.java fails with AccessDeniedException due to permissions of files in /tmp [v5]

yaqsun duke at openjdk.org
Mon Feb 26 10:10:56 UTC 2024


On Fri, 23 Feb 2024 06:14:09 GMT, yaqsun <duke at openjdk.org> wrote:

>> testcase: java/nio/file/Files/CopyMoveVariations.java
>> 
>> Method createTempFile() creates "/tmp/file*" that it causes file copy permission issue when running through jtreg.
>> 
>> The method call `Files.move(source, target, options)` by Regular User causes AccessDeniedException due to ` /tmp/file*` is created when running through jtreg.
>> 
>> Create files for method "createTempFile()" passing in the current path(jtreg_test_jdk_java_nio_file_Files_CopyMoveVariations_java/scratch or JTwork/scratch).
>
> yaqsun has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8322881: Method createTempFile() causes file copy permission issue when running through jtreg

I ran an experiment on existing machines.
Running on the following environment can be replicated.


NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


and 


NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"


But running on the following environment can not be replicated.


NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic


@AlanBateman @bplb Thank you for reminding me.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17235#issuecomment-1963750037


More information about the nio-dev mailing list