LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-11-2015, 09:41 PM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
How to set shared directory for all the user in proftpd?


I have created two users this way:
adduser user1
passwd user1
mkdir /home/ftp/user1
usermod -d /home/ftp/user1 user1

The same way for user2.

Now all the users can login into their accounts with ftp,they can download and upload the their own files into their own direcotories.
Now i want to create a shared directory /home/ftp/share ,how to make all the users can just download the files in the /home/ftp/share?z
How to write the configuration file?
 
Old 08-13-2015, 10:35 AM   #2
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Rep: Reputation: 31
simple way is to create a symlink in each user , that points to that share and change permissions to 700 or whatever is suits

symlinks can be created by ln -s target link_name
ln -s /home/ftp/share /home/ftp/user1/shared_folder
ln -s /home/ftp/share /home/ftp/user2/shared_folder
chmod -r 700 /home/ftp/share

enjoy !

Last edited by yo8rxp; 08-13-2015 at 10:37 AM.
 
1 members found this post helpful.
Old 08-13-2015, 10:46 AM   #3
tux111
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Xubuntu
Posts: 81

Rep: Reputation: Disabled
You could create a ftpshare group. User1 and User2 are members. Ftpshare-Group owns the shared directory. The group is allowed to access it. ProFTP permissions are described here: http://www.proftpd.org/docs/howto/Limit.html

Probably you have to set the Setgid flag for the shared directory, if User1 and User2 don't have the same primary group.
 
1 members found this post helpful.
Old 08-13-2015, 12:10 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by tux111 View Post
Probably you have to set the Setgid flag for the shared directory, if User1 and User2 don't have the same primary group.
and those instructions are at http://ubuntuforums.org/showthread.p...4#post13337154
 
Old 08-13-2015, 12:17 PM   #5
tux111
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Xubuntu
Posts: 81

Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
luofeiyu has asked the same question there!

I meant g+s for the directory, but maybe +t is better. The difference is explained at ubuntuforums.org too.
 
  


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
[SOLVED] proftpd virtualhost's user's directory windstory Linux - Newbie 2 04-13-2012 12:26 PM
How to set resolution and refresh rate for user shared workstation 1qaz Linux - Desktop 1 08-06-2011 12:00 PM
Shared FTP directory - separate user permissions jon20usa Linux - Server 1 03-30-2011 05:59 PM
How do I set a real system user in ProFTP to set to a specific directory? j.smith1981 Linux - Server 27 12-14-2010 08:32 AM
Proftpd user directory permissions Th3_J3st3R Linux - Server 1 10-19-2007 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:42 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