Where to install sample data with a debian package











up vote
0
down vote

favorite












I'm currently porting a Windows application to Linux which has a set of sample data (images, configurations, source code, etc.) that can be used and changed by the user. To allow the user to actually modify the data, I would like to put it in a location where he is allowed to that. Also future users that will be added to the system should be allowed to modify the data without changing the permissions or anything like that.



On Windows there is a C:UsersPublic folder where each user can read from and write to. I did a bit of research, and the best option for Linux seems to be the /srv folder, however I never heard of that folder and maybe there are better options.



The application is packaged in a debian package and currently installs to /opt/<MyApplication> and this is also the location where the sample data is currently put to, however with root as the owner. Should I put the sample data in the current users folder (something like ~/.<MyApplication>/sample_data)? I could also just change the permissions of the /opt/<MyApplication> folder, but this sound like a bad idea to me.



Maybe someone knows what the best equivalent for Windows' Public folder on Linux?










share|improve this question


















  • 1




    deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
    – user535733
    Nov 26 at 19:21










  • Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
    – bender
    Nov 27 at 7:54















up vote
0
down vote

favorite












I'm currently porting a Windows application to Linux which has a set of sample data (images, configurations, source code, etc.) that can be used and changed by the user. To allow the user to actually modify the data, I would like to put it in a location where he is allowed to that. Also future users that will be added to the system should be allowed to modify the data without changing the permissions or anything like that.



On Windows there is a C:UsersPublic folder where each user can read from and write to. I did a bit of research, and the best option for Linux seems to be the /srv folder, however I never heard of that folder and maybe there are better options.



The application is packaged in a debian package and currently installs to /opt/<MyApplication> and this is also the location where the sample data is currently put to, however with root as the owner. Should I put the sample data in the current users folder (something like ~/.<MyApplication>/sample_data)? I could also just change the permissions of the /opt/<MyApplication> folder, but this sound like a bad idea to me.



Maybe someone knows what the best equivalent for Windows' Public folder on Linux?










share|improve this question


















  • 1




    deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
    – user535733
    Nov 26 at 19:21










  • Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
    – bender
    Nov 27 at 7:54













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm currently porting a Windows application to Linux which has a set of sample data (images, configurations, source code, etc.) that can be used and changed by the user. To allow the user to actually modify the data, I would like to put it in a location where he is allowed to that. Also future users that will be added to the system should be allowed to modify the data without changing the permissions or anything like that.



On Windows there is a C:UsersPublic folder where each user can read from and write to. I did a bit of research, and the best option for Linux seems to be the /srv folder, however I never heard of that folder and maybe there are better options.



The application is packaged in a debian package and currently installs to /opt/<MyApplication> and this is also the location where the sample data is currently put to, however with root as the owner. Should I put the sample data in the current users folder (something like ~/.<MyApplication>/sample_data)? I could also just change the permissions of the /opt/<MyApplication> folder, but this sound like a bad idea to me.



Maybe someone knows what the best equivalent for Windows' Public folder on Linux?










share|improve this question













I'm currently porting a Windows application to Linux which has a set of sample data (images, configurations, source code, etc.) that can be used and changed by the user. To allow the user to actually modify the data, I would like to put it in a location where he is allowed to that. Also future users that will be added to the system should be allowed to modify the data without changing the permissions or anything like that.



On Windows there is a C:UsersPublic folder where each user can read from and write to. I did a bit of research, and the best option for Linux seems to be the /srv folder, however I never heard of that folder and maybe there are better options.



The application is packaged in a debian package and currently installs to /opt/<MyApplication> and this is also the location where the sample data is currently put to, however with root as the owner. Should I put the sample data in the current users folder (something like ~/.<MyApplication>/sample_data)? I could also just change the permissions of the /opt/<MyApplication> folder, but this sound like a bad idea to me.



Maybe someone knows what the best equivalent for Windows' Public folder on Linux?







software-installation permissions dpkg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 at 17:45









bender

61




61








  • 1




    deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
    – user535733
    Nov 26 at 19:21










  • Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
    – bender
    Nov 27 at 7:54














  • 1




    deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
    – user535733
    Nov 26 at 19:21










  • Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
    – bender
    Nov 27 at 7:54








1




1




deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
– user535733
Nov 26 at 19:21




deb packages should not install to /opt. Debian will reject the package for that. Shared modifiable data should go in /var/run/<application_name> or /run/<application_name> (they are the same location). I don't see how this question is related to Ubuntu - seems like a Unix and Linux SE question.
– user535733
Nov 26 at 19:21












Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
– bender
Nov 27 at 7:54




Thank you for your answer. If I put the data to lets say /var/run/<application_name>, what would be the best permissions for that folder to allow all users reading and writing on the data, and who should be the owner of that folder? By default the owner will be root when installed using apt but I could change the owner in a post installation script somehow.
– bender
Nov 27 at 7:54















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096245%2fwhere-to-install-sample-data-with-a-debian-package%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096245%2fwhere-to-install-sample-data-with-a-debian-package%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?