Allow www-data to read files from NFS share

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a virtual machine in a larger Linux network (with unified UIDS/GIDS) that has mounted an NFS share from a fileserver. I want to run a small nodejs server application on that machine. For security reasons, I do not want to run that application using my own user (that is known to the NFS server), but rather using the www-data system user. However, this application needs to read files from the NFS share. Currently, this does not work since the NFS server does not know the user www-data. How can I set up a mapping that allows to act www-data as if it were my own user when reading files from the NFS mount?










share|improve this question

















  • 1




    I think this unix.stackexchange.com/questions/158678/… should work for you.
    – Harm
    Nov 20 at 14:19










  • Great, that works! Thanks!
    – ma0ho
    Nov 20 at 15:13














up vote
0
down vote

favorite












I have a virtual machine in a larger Linux network (with unified UIDS/GIDS) that has mounted an NFS share from a fileserver. I want to run a small nodejs server application on that machine. For security reasons, I do not want to run that application using my own user (that is known to the NFS server), but rather using the www-data system user. However, this application needs to read files from the NFS share. Currently, this does not work since the NFS server does not know the user www-data. How can I set up a mapping that allows to act www-data as if it were my own user when reading files from the NFS mount?










share|improve this question

















  • 1




    I think this unix.stackexchange.com/questions/158678/… should work for you.
    – Harm
    Nov 20 at 14:19










  • Great, that works! Thanks!
    – ma0ho
    Nov 20 at 15:13












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a virtual machine in a larger Linux network (with unified UIDS/GIDS) that has mounted an NFS share from a fileserver. I want to run a small nodejs server application on that machine. For security reasons, I do not want to run that application using my own user (that is known to the NFS server), but rather using the www-data system user. However, this application needs to read files from the NFS share. Currently, this does not work since the NFS server does not know the user www-data. How can I set up a mapping that allows to act www-data as if it were my own user when reading files from the NFS mount?










share|improve this question













I have a virtual machine in a larger Linux network (with unified UIDS/GIDS) that has mounted an NFS share from a fileserver. I want to run a small nodejs server application on that machine. For security reasons, I do not want to run that application using my own user (that is known to the NFS server), but rather using the www-data system user. However, this application needs to read files from the NFS share. Currently, this does not work since the NFS server does not know the user www-data. How can I set up a mapping that allows to act www-data as if it were my own user when reading files from the NFS mount?







users nfs access-control






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 13:39









ma0ho

1493




1493







  • 1




    I think this unix.stackexchange.com/questions/158678/… should work for you.
    – Harm
    Nov 20 at 14:19










  • Great, that works! Thanks!
    – ma0ho
    Nov 20 at 15:13












  • 1




    I think this unix.stackexchange.com/questions/158678/… should work for you.
    – Harm
    Nov 20 at 14:19










  • Great, that works! Thanks!
    – ma0ho
    Nov 20 at 15:13







1




1




I think this unix.stackexchange.com/questions/158678/… should work for you.
– Harm
Nov 20 at 14:19




I think this unix.stackexchange.com/questions/158678/… should work for you.
– Harm
Nov 20 at 14:19












Great, that works! Thanks!
– ma0ho
Nov 20 at 15:13




Great, that works! Thanks!
– ma0ho
Nov 20 at 15:13















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f482974%2fallow-www-data-to-read-files-from-nfs-share%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















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482974%2fallow-www-data-to-read-files-from-nfs-share%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

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)