LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2014, 05:05 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 559

Rep: Reputation: Disabled
Giving remote access to a directory


I would like to give someone access to upload/modify/delete files and directories in one specific directory. I don't know what type of PC they have, but it is probably a Mac or PC. What would be the best way to do so? FTP or Samba or something else? Thanks
 
Old 04-27-2014, 03:55 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,534

Rep: Reputation: 132Reputation: 132
Easiest way is to setup an ftp server like pure-ftpd I guess but this is not very secure. Another option is to run an ssh server and give access via scp or ssh. But I do not know how to restrict users in this case to a specific directory. Should be possible though.
 
Old 04-27-2014, 06:34 AM   #3
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,606

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
...in other words, before you can do that, you have to set up some kind of server on your computer.
do you have that already? then it's easy and there's various ways.
it doesn't matter what kind of OS the remote client uses, but for them it would probably be more convenient if it's a unix-like system (like e.g. linux).
 
Old 04-27-2014, 08:40 AM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 559

Original Poster
Rep: Reputation: Disabled
Thanks j-ray and ondoho,

It is the restricting to a directory part which has me for a loop.

I could do this using Samba, but I don't think Samba is the best approach, and feel sftp seems best. I have ssh running on the server, and can access it using Filezilla FTP client.

When remotely accessing, I just want them to have access to one particular directory, and ideally see just that directory when they sftp in.
 
Old 04-27-2014, 09:26 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,534

Rep: Reputation: 132Reputation: 132
maybe this helps:
http://www.techrepublic.com/blog/lin...-directories/#.
 
Old 04-27-2014, 12:01 PM   #6
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 559

Original Poster
Rep: Reputation: Disabled
Thanks J-Ray, Looks promising. Seems like I can add a user, make his home directory the specific directory I wish to share, and all (hopefully) will work.
 
Old 05-12-2014, 10:06 AM   #7
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 559

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by j-ray View Post
Took me a while to get back to this. I did not give you all the requirements, and unfortunately this will not work. To chroot a user or group, root needs to exclusively own directories under the directory you are trying to jail them to. I need others to be able to access the directory. If I add a group to the directory structure and give it 0775 permission, I get a "Write failed: Broken pipe" error when trying to sftp in.

Now, jailing the user to their home directory, and not some other directory, showed some success. Problem with this approach is I am trying to jail them to specific subdirectory in my website directory root. It is "possible" to move part of my website to the jailed user's home, and then mount their home back into my website file structure. This is not ideal, however, since I am using Git for version control on my website files.

Any other thoughts? Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NFS setup to access directory from a remote machine as non-root user suraj278 Linux - Server 3 03-06-2012 10:00 PM
[SOLVED] Giving a user write access to a directory and subdirectories wasisnt Linux - General 3 08-11-2010 01:56 PM
doing a ls from a directory (not the current) giving the files without path Byenary Linux - Newbie 5 06-25-2008 12:35 PM
Permissions: giving specific groups write access to a directory kinetik Linux - General 3 07-06-2006 09:30 AM
giving myself access?? wrat Linux - Newbie 15 05-12-2004 10:31 PM


All times are GMT -5. The time now is 09:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration