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

Installer tries and fails to create directory under /tmp in Ubuntu 22.04 #335

Closed
Zackey opened this issue May 7, 2022 · 2 comments
Closed

Comments

@Zackey
Copy link

Zackey commented May 7, 2022

Installer cannot create its directory under /tmp. This may be caused by exiting early although in my case I think it was just no permissions.

Steps to reproduce:
Have ubuntu 22.04
Run script
???
Error?

mkdir: cannot create directory ‘/tmp/mo2-linux-installer-downloads-cache/OpenJDK8U-jre_x64_windows_hotspot_8u312b07’: Permission denied

After checking the google, it seems root user is owner of /tmp on ubuntu 22.04 and that the regular user (which you must run script as) can't create directory. Note that if you run script as root, it will be unable to locate steam correctly as script relies on home path for this.

Suggested fix is just to change the script to make a directory in home directory, such as ~/tmp/mo2-folder-here

I fixed it myself by setting 777 on /tmp using chmod, then just set it back after the script was finished.

@picobyte
Copy link

Could be the user running the script can't write to /tmp (try touching a (new) file in /tmp), or a parent directory was not created in the script; a mkdir should be a 'mkdir -p' or maybe you're just out of disk space on /tmp?

@rockerbacon
Copy link
Owner

Permission settings for /tmp should be 1777. Ubuntu likely didn't set /tmp to something other than that, this would break most programs creating temporary files. The FHS specifies:

The /tmp directory must be made available for programs that require temporary files.

I'd assume limiting access solely to programs owned by root breaks this specification.

Something like ~/tmp shouldn't be used because /tmp is a proper temporary mount, and creating such a mount requires root permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants