Write Rights Aren't Right
June 18, 2005
As I mentioned in my first post, I have my new Mac set up differently from my old one. Instead of using an account with administrator rights for daily use, I have separate administrator and personal accounts. For the most part, this hasn't caused any trouble, and often when I try to do something that requires administrator rights, such as dragging an item to the Applications folder, I am prompted with an Authenticate dialog. Thus, I usually don't have to switch to the administrator account at all.
However, there are some programs that want to have write access to the folder that they're in, or to files in the folder that they're in. All the programs that I've encountered so far that have this property are games. Often, a game will save its high scores to a file within the executable's folder, rather than in some globally writable location. Sometimes even the options are stored in a file in the executable's folder, rather than in the user's Preferences folder as they should be. This can cause problems, when trying to play the game from a user account, ranging from settings and scores not being saved, to the program unexpectedly quitting at some point, sometimes immediately after launch.
At first I tried dealing with this intelligently; I would launch and play a game as the administrator, allow it to create a high score file, and then set global write permissions on the high score file. Then I could play from the user account, and scores would be saved. But finding which file(s) or folder(s) to make globally writable isn't always easy, plus having to do this for a number of games takes time. So eventually I got lazy, and for every game that wouldn't work properly from a user account, I just recursively set the game's entire folder to be globally writable. It's not the end of the world if someone accidentally deletes a game, after all.
Oddly, I still have a game that doen't work at all from a user account, even after setting its folder and everything in it to be globally writable. It is Komi, which brings up an error dialog shortly after launch:

I am at a loss as to how it can not work properly after making its folder and the entire folder's contents globally writable. It must be trying to write something somewhere else in the file system, which is rather disconcerting.
However, there are some programs that want to have write access to the folder that they're in, or to files in the folder that they're in. All the programs that I've encountered so far that have this property are games. Often, a game will save its high scores to a file within the executable's folder, rather than in some globally writable location. Sometimes even the options are stored in a file in the executable's folder, rather than in the user's Preferences folder as they should be. This can cause problems, when trying to play the game from a user account, ranging from settings and scores not being saved, to the program unexpectedly quitting at some point, sometimes immediately after launch.
At first I tried dealing with this intelligently; I would launch and play a game as the administrator, allow it to create a high score file, and then set global write permissions on the high score file. Then I could play from the user account, and scores would be saved. But finding which file(s) or folder(s) to make globally writable isn't always easy, plus having to do this for a number of games takes time. So eventually I got lazy, and for every game that wouldn't work properly from a user account, I just recursively set the game's entire folder to be globally writable. It's not the end of the world if someone accidentally deletes a game, after all.
Oddly, I still have a game that doen't work at all from a user account, even after setting its folder and everything in it to be globally writable. It is Komi, which brings up an error dialog shortly after launch:

I am at a loss as to how it can not work properly after making its folder and the entire folder's contents globally writable. It must be trying to write something somewhere else in the file system, which is rather disconcerting.


