[Slackbuilds-users] All-writable directory under /opt
Daniel Prosser
dpross1100 at msn.com
Mon May 6 01:40:01 UTC 2024
> Hm. You mean, if the copy was created by running it as root, it
> *still* tries to make a new copy, if run without a config file?
Yes, it still tries to make a new copy if the config file isn't already
present or if using a config file from a previous version that doesn't
include that setting. Actually, upon further review, the file
stockfish-16.1-64 is already there when LucasChess is first installed,
but it apparently copies over it or at least modifies it in some way
during the detection process. So my initial idea of simply providing
this file is definitely not enough to avoid this process.
> That could work. Go with a lowercase group name though, lucaschess or
> just lucas.
>
> For that matter, you could go with the system games group. Ask
> user to join that group. Though, it would also let the user edit
> the high scores for games that save high scores as the games
> group. Realistically I don't think this matters much.
Thanks, I think I'll go with the approach of creating a new group. It
seems like the most straightforward way of dealing with the problem, and
there are a good number of existing scripts that do something like this.
Dan
On 5/4/24 23:09, B. Watson wrote:
>
>
> On Sat, 4 May 2024, Daniel Prosser wrote:
>
>> Thanks for the ideas. I like the idea of using the setgid bit, but
>> I'm having trouble getting it to work. First, the main executable is
>> a wrapper script, which may be a problem, but even applying the
>> setguid bit to the binary file and foregoing the wrapper script
>> (doing the stuff the wrapper script would have done manually in the
>> shell for testing purposes) results in library import errors. I
>> assume this is due to permissions somehow, but I don't really
>> understand why.
>
> Because the wrapper script exports LD_LIBRARY_PATH (to tell the
> executable where to find the libs), and glibc deliberately ignores
> that variable on binaries with the setuid or setgid bits set.
>
> So that approach wouldn't work.
>
>> Asking the user to run as root the first time would work, but I would
>> also have to tell them to then copy the configuration directory from
>> /root to their user directory and set permissions accordingly, which
>> seems rather unwieldy and inconvenient.
>
> Hm. You mean, if the copy was created by running it as root, it
> *still* tries to make a new copy, if run without a config file?
>
>> In a related idea, what about installing the program with some group
>> ownership (say "LucasChess") and asking the user to join that group
>> before running?
>
> That could work. Go with a lowercase group name though, lucaschess or
> just lucas.
>
> For that matter, you could go with the system games group. Ask
> user to join that group. Though, it would also let the user edit
> the high scores for games that save high scores as the games
> group. Realistically I don't think this matters much.
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
More information about the SlackBuilds-users
mailing list