Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Support > Tech Support
FAQ Community Calendar

Tech Support Trouble running the game? Found a bug? Post here.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2011, 03:12 PM
LordJason LordJason is offline
Junior Member
 
Join Date: Jul 2011
Posts: 7
Default [linux] - Installer permission issue.

I have a few things to report, and will be making a seperate thread for each. I hope that is proper.

altitude needs to check the permissions on the files that it creates.

If a user installs altitude with root privs, at the end of the installation it asks if you would like to launch the game. Doing so runs the game as root. I'm not sure if the files in /opt/altitude/log/ are created via the first run of the game or via the installer.... But they end up being created with permissions that will not work for a standard user.
This is easily fixed with sudo chmod -R 777 /opt/altitude/log
However if altitude did this automatically it would be nicer.


some console errors for the purpose of finding this post...
java.io.FileNotFoundException: /opt/altitude/log/Launch.log (Permission denied)
log4j:WARN No appenders could be found for logger (em.update.client.launch.UpdateLauncher).
Reply With Quote
  #2  
Old 08-02-2011, 11:34 AM
ledow ledow is offline
Member
 
Join Date: Sep 2010
Posts: 80
Default

Eek!

Yeah, if you install as root, this happens with any program because it can only assume the user is root so the files are owned as root.

But blanket 777-ing of files is silly - they aren't 777 for a reason, even if you install as the wrong user. You should "chown -R username:groupname logs/" instead, so that the right users own those particular files rather than letting the world and his brother have access to them.

Better would be to not install as root at all.

The file error is actually quite clear "Permission denied" and even points to the right file to tell you where the permissions need to be checked.

I have an altitude user on my servers - it only has permission to see and run programs from the altitude folder, which is owned by that same user. I've not had to change any permissions, just owners. And the process ends up being launched as a lowly user with no shell and no access to anything but altitude. Pretty standard *nix installation practice, if you look at any large program that acts as an Internet server on a standard distro.

Don't get in the habit of 777-ing in order to solve your problems. It's like saying "Hell, the lock on my front door is sticky - I know, I'll just remove the lock entirely so anything opens the door". Don't!

Altitude runs on Java, with it's own JRE installed in the altitude folder. Although you've only done the log folder, it's very bad practice to 777 stuff that close to something that has such enormous potential to go wrong and run rogue code. You do *NOT* want your website user (e.g. www-data) to be able to access folders like that, even if you think that it's handling directory traversal attacks properly at the moment.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:04 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC