Is it possible to mount a SSHFS point in a way to preserve (local) ownerships and permissions?
Clash 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 ?)
ssh permissions mount sshfs ownership
add a comment |Â
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 ?)
ssh permissions mount sshfs ownership
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
add a comment |Â
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 ?)
ssh permissions mount sshfs ownership
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 ?)
ssh permissions mount sshfs ownership
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
add a comment |Â
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
add a comment |Â
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).
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
add a comment |Â
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).
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
add a comment |Â
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).
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
add a comment |Â
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).
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).
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
add a comment |Â
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
add a comment |Â
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
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
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
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
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
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