Run in docker with random user id - Wineprefix problems

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
magick93
Level 1
Level 1
Posts: 6
Joined: Thu Sep 14, 2017 10:06 pm

Run in docker with random user id - Wineprefix problems

Post by magick93 »

Hello

I am trying to run wine in a docker image on OpenShift. And for security reasons OpenShift does not allow docker containers to run using root. Instead they run as a random UID.

When the container starts, the application fails to start, and errors with:

Code: Select all

<wineprefix> is not owned by you, refusing to create a configuration directory there
As far as I understand, there can only be one owner. And at runtime its impossible to know which user will be in use.

Does the wineprefix directory have to be owned by the current user? Or is it acceptable to have write permissions?

What options are available for this situation?

Thanks
User avatar
dimesio
Moderator
Moderator
Posts: 13204
Joined: Tue Mar 25, 2008 10:30 pm

Re: Run in docker with random user id - Wineprefix problems

Post by dimesio »

magick93 wrote: Does the wineprefix directory have to be owned by the current user?

Yes.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Run in docker with random user id - Wineprefix problems

Post by jkfloris »

What options are available for this situation?
You can fool Wine with a symlink to the wineprefix

For example, I use symlinks to install games system wide

Code: Select all

floris@Jessica:~/Games/Driver$ ls -asl
0 lrwxrwxrwx  1 floris floris   28 feb 17  2015 dosdevices -> /opt/Games/Driver/dosdevices
0 lrwxrwxrwx  1 floris floris   25 feb 17  2015 drive_c -> /opt/Games/Driver/drive_c
0 lrwxrwxrwx  1 floris floris   28 feb 17  2015 system.reg -> /opt/Games/Driver/system.reg
4 -rw-r--r--  1 floris floris   11 mrt 12  2015 .update-timestamp
4 -rw-r--r--  1 floris floris 3272 feb 17  2015 userdef.reg
0 lrwxrwxrwx  1 floris floris   26 feb 17  2015 user.reg -> /opt/Games/Driver/user.reg

floris@Jessica:/home/julian/Games/Driver$ ls -asl
0 lrwxrwxrwx   1 julian julian   28 dec 31  2015 dosdevices -> /opt/Games/Driver/dosdevices
0 lrwxrwxrwx   1 julian julian   25 dec 31  2015 drive_c -> /opt/Games/Driver/drive_c
0 lrwxrwxrwx   1 julian julian   28 dec 31  2015 system.reg -> /opt/Games/Driver/system.reg
4 -rw-r--r--   1 julian julian   11 dec 31  2015 .update-timestamp
4 -rw-r--r--   1 julian julian 3332 dec 31  2015 userdef.reg
0 lrwxrwxrwx   1 julian julian   26 dec 31  2015 user.reg -> /opt/Games/Driver/user.reg

floris@Jessica:~/Games/Driver$ ls -als /opt/Games/Driver/
4 drwxrwxr-x   4 games games    4096 mrt 15  2015 .
4 drwxrwxrwx  17 games games    4096 aug 29 12:59 ..
4 drwxrwxr-x.  2 games games    4096 sep 17  2015 dosdevices
4 drwxrwxr-x.  5 games games    4096 sep 17  2015 drive_c
1384 -rw-rwxr--   1 games games 1414658 mei 23 12:41 system.reg
4 -rw-rwxr--.  1 games games      11 okt 13  2014 .update-timestamp
56 -rw-rwxr--   1 games games   56881 mei 23 12:41 user.reg

Locked