Qt-interest Archive, July 2007
Where to save "global" data in linux filesystem
Message 1 in thread
Hello
i'm just developing an command line tool for linux (c++), which has to
save its data into a single file in the filesystem, undependently from
running user.
its handling is best described like or compared with "updatedb". there
is only one data-file for all users.
in which folder should i create the application's data-file, and whats
about the needed rights on it? can this application "ask" for getting
needed privileges like on windows?
is there a special folder intended for handling such things? if yes,
what folder?
kind regards for any help
hagen
--
[ signature omitted ]
Message 2 in thread
hello !
as far as I know, so such data should be under /var or /etc (for
config files).
The rights: if you want that all users can read and write enter chmod
666 <your file>
as far as I know, there is no way for an application to "ask" for
more privileges. (but maybe the su command helps or you can set the
setuid bit (chmod +s <yourapp>, but this could be a security hole)
I hope this helps you a little bit.
Best regards,
Heiko
Am 27.07.2007 um 21:43 schrieb Hagen:
> Hello
>
> i'm just developing an command line tool for linux (c++), which has to
> save its data into a single file in the filesystem, undependently from
> running user.
> its handling is best described like or compared with "updatedb". there
> is only one data-file for all users.
>
> in which folder should i create the application's data-file, and whats
> about the needed rights on it? can this application "ask" for getting
> needed privileges like on windows?
>
> is there a special folder intended for handling such things? if yes,
> what folder?
>
> kind regards for any help
> hagen
>
>
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 3 in thread
hello again ;-)
/usr/share and /opt could also be the a "correct place" (e.g KDEs
global data is under /usr/share, java under /opt).
You could look at the LSB (Linux Standard Base) to find out what the
correct place is for your application.
Best Regards
Heiko
Am 27.07.2007 um 22:09 schrieb Heiko Steindl
> hello !
>
> as far as I know, so such data should be under /var or /etc (for
> config files).
>
> The rights: if you want that all users can read and write enter
> chmod 666 <your file>
>
> as far as I know, there is no way for an application to "ask" for
> more privileges. (but maybe the su command helps or you can set the
> setuid bit (chmod +s <yourapp>, but this could be a security hole)
>
> I hope this helps you a little bit.
>
> Best regards,
>
> Heiko
>
>
>
> Am 27.07.2007 um 21:43 schrieb Hagen:
>
>> Hello
>>
>> i'm just developing an command line tool for linux (c++), which
>> has to
>> save its data into a single file in the filesystem, undependently
>> from
>> running user.
>> its handling is best described like or compared with "updatedb".
>> there
>> is only one data-file for all users.
>>
>> in which folder should i create the application's data-file, and
>> whats
>> about the needed rights on it? can this application "ask" for getting
>> needed privileges like on windows?
>>
>> is there a special folder intended for handling such things? if yes,
>> what folder?
>>
>> kind regards for any help
>> hagen
>>
>>
>>
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>> with "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 4 in thread
On Friday 27 July 2007, Hagen wrote:
> in which folder should i create the application's data-file, and whats
> about the needed rights on it? can this application "ask" for getting
> needed privileges like on windows?
/usr/local/your_application/your_app_files is a good place, with
~/your_application/user_overrides providing per-user configuration.
--
[ signature omitted ]
Message 5 in thread
Hello
thank you very much for your multiple support!
there are a lot of opinions about that :)
i think, /var/<my app> would be the right place after consulting my own
system and after looking in every folder you all told me
there are the most applications data files placed
but: this discussion isnt close now, everyone who wants to tell his
opinion/knowledge about that should post it here! ;)
kind regards
hagen
--
[ signature omitted ]
Message 6 in thread
Hagen wrote:
> Hello
>
> thank you very much for your multiple support!
>
> there are a lot of opinions about that :)
>
> i think, /var/<my app> would be the right place after consulting my own
> system and after looking in every folder you all told me
>
> there are the most applications data files placed
>
> but: this discussion isnt close now, everyone who wants to tell his
> opinion/knowledge about that should post it here! ;)
Well, it's not exactly Qt-related. At all.
As for where to put shared data on Linux: see
http://www.pathname.com/fhs/pub/fhs-2.3.html .
--
[ signature omitted ]
Message 7 in thread
Hi,
> as far as I know, so such data should be under /var or /etc (for
> config files).
Just to make sure: "normal" applications should not write by themselves to /etc directory during system's runtime, because of read only systems without initial RAM disks.
Regards,
Erik
--
[ signature omitted ]