LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 04:05 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

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, 02:55 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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, 05:34 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
...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, 07:40 AM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

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, 08:26 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
maybe this helps:
http://www.techrepublic.com/blog/lin...-directories/#.
 
Old 04-27-2014, 11:01 AM   #6
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

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, 09:06 AM   #7
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 PM.

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