Ubuntu 25.10 - access denied to /tmp even in 777 mode without protected mode
Description:
Java returns access denied to /tmp despite:
1777 mode for permissions
Without sticky bit on /tmp
Without protected folder mode
Steps to reproduce:
Run and app with access required to /tmp, i.e., pyspark from non-root user.
Error:
26/03/28 14:15:17 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
Using Spark's default log4j profile: org/apache/spark/log4j2-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
Exception in thread "main" java.nio.file.AccessDeniedException: /tmp/tmppqkak67g/connection12539062633467823222.info
Environment:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 25.10
Release: 25.10
Codename: questing
(.venv) cas12@cas12-System-Product-Name:~/vscode/data-algorithms-with-spark$ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p5 9.1G 358M 8.3G 5% /tmp
(.venv) cas12@cas12-System-Product-Name:~/vscode/data-algorithms-with-spark$ ls -ld /tmp
drwxrwxrwt 349 root root 974848 Mar 28 14:10 /tmp
(.venv) cas12@cas12-System-Product-Name:~/vscode/data-algorithms-with-spark$ sudo sysctl fs.protected_regular=0
fs.protected_regular = 0
copy of issue for ubuntu 25.10 https://unix.stackexchange.com/questions/805192/ubuntu-25-10-access-denied-to-tmp-even-in-777-mode-without-protected-mode
From the answer it looks like the system create dir without permissions.
Ubuntu 25.10 - access denied to /tmp even in 777 mode without protected mode
Description:
Java returns access denied to /tmp despite:
Steps to reproduce:
Run and app with access required to /tmp, i.e., pyspark from non-root user.
Error:
Environment:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 25.10
Release: 25.10
Codename: questing
copy of issue for ubuntu 25.10 https://unix.stackexchange.com/questions/805192/ubuntu-25-10-access-denied-to-tmp-even-in-777-mode-without-protected-mode
From the answer it looks like the system create dir without permissions.