Is it possible to mount a SSHFS point in a way to preserve (local) ownerships and permissions?

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











up vote
1
down vote

favorite












if I mount a sshfs point as root and use the option allow_other then on the original server (SERVERA) the files are owned by the SSH user, and on the destination server (SERVERB) are accessible (writable) by everyone.



Is it possible instead to do the mount in a way that, on SERVERB, I can preserve ownership and permission metadata?



For example, let's say that I have a user bob, I create (as root) a folder, I chown it to bob and then bob can manage his own files as if they would be on a local disk.



I am interested in a new empty share, so preserving of old data to match users on the server is not important for me.



(PS: What's the difference between unix.stackexchange.com and serverfault.com ?)







share|improve this question






















  • I may be wrong, but perhaps you are looking for NFS? Check it out...
    – Jan
    Dec 6 '17 at 14:14










  • @Jan thanks, but that's protocol is not supported by my "data space" provider
    – Antonello
    Dec 6 '17 at 14:19







  • 1




    serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
    – frams
    Dec 6 '17 at 15:50














up vote
1
down vote

favorite












if I mount a sshfs point as root and use the option allow_other then on the original server (SERVERA) the files are owned by the SSH user, and on the destination server (SERVERB) are accessible (writable) by everyone.



Is it possible instead to do the mount in a way that, on SERVERB, I can preserve ownership and permission metadata?



For example, let's say that I have a user bob, I create (as root) a folder, I chown it to bob and then bob can manage his own files as if they would be on a local disk.



I am interested in a new empty share, so preserving of old data to match users on the server is not important for me.



(PS: What's the difference between unix.stackexchange.com and serverfault.com ?)







share|improve this question






















  • I may be wrong, but perhaps you are looking for NFS? Check it out...
    – Jan
    Dec 6 '17 at 14:14










  • @Jan thanks, but that's protocol is not supported by my "data space" provider
    – Antonello
    Dec 6 '17 at 14:19







  • 1




    serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
    – frams
    Dec 6 '17 at 15:50












up vote
1
down vote

favorite









up vote
1
down vote

favorite











if I mount a sshfs point as root and use the option allow_other then on the original server (SERVERA) the files are owned by the SSH user, and on the destination server (SERVERB) are accessible (writable) by everyone.



Is it possible instead to do the mount in a way that, on SERVERB, I can preserve ownership and permission metadata?



For example, let's say that I have a user bob, I create (as root) a folder, I chown it to bob and then bob can manage his own files as if they would be on a local disk.



I am interested in a new empty share, so preserving of old data to match users on the server is not important for me.



(PS: What's the difference between unix.stackexchange.com and serverfault.com ?)







share|improve this question














if I mount a sshfs point as root and use the option allow_other then on the original server (SERVERA) the files are owned by the SSH user, and on the destination server (SERVERB) are accessible (writable) by everyone.



Is it possible instead to do the mount in a way that, on SERVERB, I can preserve ownership and permission metadata?



For example, let's say that I have a user bob, I create (as root) a folder, I chown it to bob and then bob can manage his own files as if they would be on a local disk.



I am interested in a new empty share, so preserving of old data to match users on the server is not important for me.



(PS: What's the difference between unix.stackexchange.com and serverfault.com ?)









share|improve this question













share|improve this question




share|improve this question








edited Dec 6 '17 at 16:20









frams

374217




374217










asked Dec 6 '17 at 13:56









Antonello

2401312




2401312











  • I may be wrong, but perhaps you are looking for NFS? Check it out...
    – Jan
    Dec 6 '17 at 14:14










  • @Jan thanks, but that's protocol is not supported by my "data space" provider
    – Antonello
    Dec 6 '17 at 14:19







  • 1




    serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
    – frams
    Dec 6 '17 at 15:50
















  • I may be wrong, but perhaps you are looking for NFS? Check it out...
    – Jan
    Dec 6 '17 at 14:14










  • @Jan thanks, but that's protocol is not supported by my "data space" provider
    – Antonello
    Dec 6 '17 at 14:19







  • 1




    serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
    – frams
    Dec 6 '17 at 15:50















I may be wrong, but perhaps you are looking for NFS? Check it out...
– Jan
Dec 6 '17 at 14:14




I may be wrong, but perhaps you are looking for NFS? Check it out...
– Jan
Dec 6 '17 at 14:14












@Jan thanks, but that's protocol is not supported by my "data space" provider
– Antonello
Dec 6 '17 at 14:19





@Jan thanks, but that's protocol is not supported by my "data space" provider
– Antonello
Dec 6 '17 at 14:19





1




1




serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
– frams
Dec 6 '17 at 15:50




serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
– frams
Dec 6 '17 at 15:50










1 Answer
1






active

oldest

votes

















up vote
1
down vote













The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).



Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).






share|improve this answer




















  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11 '17 at 7:58










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: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
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%2f409217%2fis-it-possible-to-mount-a-sshfs-point-in-a-way-to-preserve-local-ownerships-an%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).



Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).






share|improve this answer




















  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11 '17 at 7:58














up vote
1
down vote













The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).



Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).






share|improve this answer




















  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11 '17 at 7:58












up vote
1
down vote










up vote
1
down vote









The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).



Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).






share|improve this answer












The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).



Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 6 '17 at 19:33









Austin Hemmelgarn

5,1641915




5,1641915











  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11 '17 at 7:58
















  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11 '17 at 7:58















Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
– Antonello
Dec 11 '17 at 7:58




Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
– Antonello
Dec 11 '17 at 7:58

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409217%2fis-it-possible-to-mount-a-sshfs-point-in-a-way-to-preserve-local-ownerships-an%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay