sshfs called as user succeeds, however called as root fails





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















This call to sshfs as user works:



sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


This call to sshfs as root fails:



sudo sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


The host10.185.64.122 is an unprivileged LXD container, if that makes any difference.



When mounting via /etc/fstab it is called from root, which is why I'd like to know.



Why does this happen?



Version info on the client side:



$ sshfs --version
SSHFS version 2.8
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19

$ uname -a
Linux ub18 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lxd --version
3.11


Additional info:



I ran both calls through strace. The strange thing is that non-sudo version made a call to mount and of course that call failed because mount requires root privileges.



Then the execution of the non-sudo version takes a different branch and makes some calls which apparently work.










share|improve this question

























  • Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

    – Ryan J. Yoder
    Mar 28 at 20:52


















0















This call to sshfs as user works:



sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


This call to sshfs as root fails:



sudo sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


The host10.185.64.122 is an unprivileged LXD container, if that makes any difference.



When mounting via /etc/fstab it is called from root, which is why I'd like to know.



Why does this happen?



Version info on the client side:



$ sshfs --version
SSHFS version 2.8
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19

$ uname -a
Linux ub18 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lxd --version
3.11


Additional info:



I ran both calls through strace. The strange thing is that non-sudo version made a call to mount and of course that call failed because mount requires root privileges.



Then the execution of the non-sudo version takes a different branch and makes some calls which apparently work.










share|improve this question

























  • Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

    – Ryan J. Yoder
    Mar 28 at 20:52














0












0








0








This call to sshfs as user works:



sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


This call to sshfs as root fails:



sudo sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


The host10.185.64.122 is an unprivileged LXD container, if that makes any difference.



When mounting via /etc/fstab it is called from root, which is why I'd like to know.



Why does this happen?



Version info on the client side:



$ sshfs --version
SSHFS version 2.8
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19

$ uname -a
Linux ub18 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lxd --version
3.11


Additional info:



I ran both calls through strace. The strange thing is that non-sudo version made a call to mount and of course that call failed because mount requires root privileges.



Then the execution of the non-sudo version takes a different branch and makes some calls which apparently work.










share|improve this question
















This call to sshfs as user works:



sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


This call to sshfs as root fails:



sudo sshfs cc@10.185.64.122:/home/cc /home/craig/sshfs/S/cc -o idmap=user,IdentityFile=/home/craig/.ssh/id-lxd,port=22,uid=1000,gid=1000,allow_other


The host10.185.64.122 is an unprivileged LXD container, if that makes any difference.



When mounting via /etc/fstab it is called from root, which is why I'd like to know.



Why does this happen?



Version info on the client side:



$ sshfs --version
SSHFS version 2.8
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19

$ uname -a
Linux ub18 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ lxd --version
3.11


Additional info:



I ran both calls through strace. The strange thing is that non-sudo version made a call to mount and of course that call failed because mount requires root privileges.



Then the execution of the non-sudo version takes a different branch and makes some calls which apparently work.







lxd sshfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 21:36







Craig Hicks

















asked Mar 28 at 19:47









Craig HicksCraig Hicks

28719




28719













  • Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

    – Ryan J. Yoder
    Mar 28 at 20:52



















  • Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

    – Ryan J. Yoder
    Mar 28 at 20:52

















Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

– Ryan J. Yoder
Mar 28 at 20:52





Could you provide some addition info on your setup? OS version/release. sshfs version? Are you seeing any errors in the logs? Also, what is the exact fstab entry you're using?

– Ryan J. Yoder
Mar 28 at 20:52










0






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',
autoActivateHeartbeat: false,
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%2f1129496%2fsshfs-called-as-user-succeeds-however-called-as-root-fails%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129496%2fsshfs-called-as-user-succeeds-however-called-as-root-fails%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

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b