LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to set shared directory for all the user in proftpd? (https://www.linuxquestions.org/questions/linux-server-73/how-to-set-shared-directory-for-all-the-user-in-proftpd-4175550530/)

luofeiyu 08-11-2015 09:41 PM

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?

yo8rxp 08-13-2015 10:35 AM

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 !

tux111 08-13-2015 10:46 AM

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.

Habitual 08-13-2015 12:10 PM

Quote:

Originally Posted by tux111 (Post 5405281)
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

tux111 08-13-2015 12:17 PM

Quote:

Originally Posted by Habitual (Post 5405327)

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.


All times are GMT -5. The time now is 09:43 AM.