Permission for all users

Questions about Wine on Linux
Locked
kholyphoenix1
Newbie
Newbie
Posts: 4
Joined: Tue Dec 24, 2019 4:10 pm

Permission for all users

Post by kholyphoenix1 »

Hello, guys!
I was able to install a program (ERP), but I need it to run on any User who logs in to Linux.
For some reason, wine does not allow this to happen.
Is there any other way to solve?

Thanks!
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Permission for all users

Post by jkfloris »

As far as I know there isn't an official way, but there are ways to bypass the "is not owned by you" error. (Bug 11112)

Below are a few ways to get you started.
Each way has its advantages and disadvantages and have no support whatsoever.

- Use symbolic links to the files and folders inside the wineprefix.
- Use a script to change the owner of the wineprefix to the current user before starting the application.
- Create a "Wine user" and use sudo -u to install and run the application.
kholyphoenix1
Newbie
Newbie
Posts: 4
Joined: Tue Dec 24, 2019 4:10 pm

Re: Permission for all users

Post by kholyphoenix1 »

- Use symbolic links to the files and folders inside the wineprefix.
- Use a script to change the owner of the wineprefix to the current user before starting the application.
- Create a "Wine user" and use sudo -u to install and run the application.
1º Option: What I'm going to access is not just the folder but an '.exe' so 'symbolic link' doesn't solve it.
2º Option: I tried in many ways to do this and failed. Can you help me?
3º Option: Hmmm...
kholyphoenix1
Newbie
Newbie
Posts: 4
Joined: Tue Dec 24, 2019 4:10 pm

Re: Permission for all users

Post by kholyphoenix1 »

Use a script to change the owner of the wineprefix to the current user before starting the application.
- Create a "Wine user" and use sudo -u to install and run the application.

Yesterday I spent all afternoon trying to do something that could solve this and was unsuccessful.
Could you help me do one of these two ways?
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Permission for all users

Post by jkfloris »

I only have experience with the first option, so I'll try to explain it.
Again, this is not supported, so use at your own risk
In this example I use the username "julian" for the other user. Change this name for every other user.

Preparation
- Make sure julian have access to the "users" group

Code: Select all

sudo usermod -a -G users julian
Create the master Wineprefix
- Install the application with wine

Set the permissions
- Change the Wineprefix group to "users" and make sure the group have the same permissions as the user.

Code: Select all

chgrp -R users ~/.wine
chmod -R g=u ~/.wine
Create the symbolic links
- Create a .wine directory in the home folder of julian
- Link "drive_c" and "dosdevices" to this directory
- Copy the *.reg files to this directory
- Set the username

Code: Select all

sudo mkdir /home/julian/.wine
sudo ln -s ~/.wine/drive_c /home/julian/.wine/drive_c
sudo ln -s ~/.wine/dosdevices /home/julian/.wine/dosdevices
sudo cp ~/.wine/*.reg /home/julian/.wine
sudo chown -R julian:users /home/julian/.wine
kholyphoenix1
Newbie
Newbie
Posts: 4
Joined: Tue Dec 24, 2019 4:10 pm

Re: Permission for all users

Post by kholyphoenix1 »

Thanks a lot!! :D
Locked