LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-08-2011, 05:25 PM   #1
mr.sambo
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Rep: Reputation: 0
Question sshfs & Permission denied


Hi,

I have a problem with sshfs
I want to share a binary with some others comptuers, but i only want them to be able to execute (no read/write ).

So, on my main server, i chown root:root bin & chmod 701 bin.
That work nicely on main server, local users can execute bin w/o read/write ...
But when i mount directory using sshfs, users cant exec/read/write ...

Can you help me?

Thanks


SSHFS version 2.2
FUSE library version: 2.8.4
fusermount version: 2.8.4
using FUSE kernel interface version 7.12
 
Old 07-08-2011, 06:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And what are the permissions on the local mountpoint? Which mount-options
did you use?


Cheers,
Tink
 
Old 07-08-2011, 06:38 PM   #3
mr.sambo
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Original Poster
Rep: Reputation: 0
rw,nosuid,nodev,max_read=65536,user=mylocaluser

Default one
 
Old 07-08-2011, 07:01 PM   #4
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
(this is a theory)

SSHFS is using FUSE userland file system. So any action on the file system is emulated over the SSH connected. The feature set you get must be emulated too. So when the emulator try to read the binary to cache it into a local executable, it hit a permission wall. Applications can't just be executed where they are, they have to be loaded in memory first. For local file system, it imply a kernel mode operation, but FUSE is not a native file system, it is an emulated file system, it just can't enter in kernel mode to do operations.

I think you will have to grant full read access to the files. Who care about reading a binary after all. The worst thing that can happen is making a copy of it.
 
Old 07-08-2011, 07:05 PM   #5
mr.sambo
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thats exactly what i want to avoid
 
Old 07-08-2011, 07:07 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Code:
 rw,nosuid,nodev,max_read=65536,user=mylocaluser
If I am not wrong this implies that user=mylocaluser will be able to access/execute binary on that particular mount. Are you able to do that using mylocaluser account.

Did you try using:

Code:
 rw,nosuid,nodev,max_read=65536,users
?

Did you try setting up suid on the source location? Here is a link that will help:
http://www.techcuriosity.com/resourc..._in_linux.php#

and then mounting the sshfs as follows:

Code:
 rw,suid,nodev,max_read=65536,users
 
Old 07-08-2011, 07:09 PM   #7
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by mr.sambo View Post
Thats exactly what i want to avoid
A solution would be to use NFS over SSH or OpenVPN or IpSec instead of SSHFS. It will be slower, but is native. (local) Connection sniffing could still occur, but there is little you can do about it anyway.

Last edited by Elv13; 07-08-2011 at 07:10 PM.
 
Old 07-08-2011, 07:44 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by mr.sambo View Post
rw,nosuid,nodev,max_read=65536,user=mylocaluser

Default one
And the perms/ownerships on the local directory you're mounting it to?
 
Old 07-09-2011, 05:12 AM   #9
mr.sambo
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Original Poster
Rep: Reputation: 0
drwxr-xr-x in local, wihth correct users
Am goin to check about NFS over SSH, maybe will be better
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Denied & it is my file & I have permission ? jv2112 Linux - Newbie 7 07-18-2010 07:25 AM
Permission denied error when trying to mount image contained in sshfs mount openSauce Linux - General 2 03-08-2009 08:50 AM
permission denied w/ SSHFS FC6 psychobyte Linux - Software 1 02-03-2007 12:04 AM
NFS & NIS: permission denied dgermann Linux - Networking 4 02-28-2006 09:39 PM
eDonkey & ed2k_gui, permission denied asktoby Linux - General 4 08-27-2003 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration