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?
software-installation permissions dpkg
add a comment |
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?
software-installation permissions dpkg
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 usingapt
but I could change the owner in a post installation script somehow.
– bender
Nov 27 at 7:54
add a comment |
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?
software-installation permissions dpkg
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
software-installation permissions dpkg
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 usingapt
but I could change the owner in a post installation script somehow.
– bender
Nov 27 at 7:54
add a comment |
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 usingapt
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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