mc: set umask to 0002 and chmod g+w the /data folder

Do this to allow write access for groups that the minecraft user is in.

This commit also fixes an issue if a group is specified with $GID and it has
no write access in the mounted host volume.
This commit is contained in:
Maxim Ivanov 2018-09-27 10:27:50 +03:00
parent 2d6316e6c3
commit e8be7685e9

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
umask 0002
chmod g+w /data
if [ $(id -u) = 0 ]; then if [ $(id -u) = 0 ]; then
if [[ -v UID && $UID != $(id -u) ]]; then if [[ -v UID && $UID != $(id -u) ]]; then
usermod -u $UID minecraft usermod -u $UID minecraft