Why do I get "Permission Denied" errors even though I have group permission?
First, when you add yourself to a group, the change is not applied immediately. The easiest thing is to logout and log back in.
Then there are write permissions of data files (as mentioned already in some of the comments). However, the solutions are not good for security.
- Add a group for the game. Do not add any user to this group.
- Make the game executable by
chmod -R ugo+rX game-directory
- Give write permissions to group only and no-one else using
chmod -R ug+w,o-w game-directory
- Add game to group
chgrp -R game-group game-directory
,chmod -R g+s game-directory
or just addgroup game-group; chgrp -R game-group game-directory; chmod -R u=rwX,g=rwXs,o=rX game-directory
If game needs to change permissions then you can do the same but for user instead of group. ie.
adduser game-owner; addgroup game-group; chown -R game-owner:game-group game-directory; chmod -R u=rwXs,g=rwXs,o=rX game-directory
Directories need x bit set (for directory that bit is seen as search bit) to open. So I use tree so I can get only the folder set and avoid the nightmare of having all the files set as executables ( the option for tree is -d List directories only.
):
sudo tree -faid here_goes_your_directory xargs -L1 -I{} sudo chmod 755 "{}"
Warning!!! you should have this into considerations:
using chmod or chown recursive on root
/
directory or system directories will destroy your OS (actually anything recursive on/
directory or system directories is dangerous)this is not a good security practice to set permission bulk like that