LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   FTP access to home folder (http://www.linuxquestions.org/questions/linux-networking-3/ftp-access-to-home-folder-174294/)

deWin 04-25-2004 02:44 AM

FTP access to home folder
 
Hello all,

I have several users setup on my RH9 linux box, each with it's own folder under the /home like /home/user01. If I login as user01 I can access my folder. I want a user "usermain" to have access to all home folders, so in other words the start folder should be /home instead of /home/usermain

How can I change usermain's permission or start folder to go to /home?

Thanks for all the big help guys.

leckie 04-25-2004 09:41 AM

changing the home directory of usermain to /home is not going to do anything as the setting is just a way to help users find there home folders, not perform permissions.


So basically you will have to do it with permissions, now this type of functionality is done by the group setting, so first you change the permissions of user folders to be 771, then you give each user there own group, if they already dont have there own group and then add the name of each users group to usermain group.


now this will give you read access to all the users, but not right access, YET.

now on unix we have stupidness, this is in the form of primary group and other groups.


So basically you can belong to any number of groups BUT only one master group.
And to edit one of the users folders you need there group name as your master group.
And changing the master group is done with a command which i have forgotten, someone look it up and report it. :)


Ow and you cannot add everyone to the same group as they would have access to each others home directory, just incase you think of doing this.

-Nw- neX 04-25-2004 10:36 AM

rehat 9, be default, will add users to their own spesific group. you can override this, either using the GUI app, or on the command line using -g and -G [for secondary group].

vsftpd is the default ftp daemon for redhat 9, and the default setting in /etc/vsftpd/vsftpd.conf should be to allow users to access $HOME. 'local_enable' must be set to YES for this to work. you will want to make sure that the var 'chroot_local_users' is set to 'YES'. heres the bit from the conf file...
Code:

# Uncomment this to allow local users to log in.
local_enable=YES

[[ snip ]]

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list

with chroot_local_users=YES, this will allow you to chroot some users, but not others by adjusting /etc/vsftpd.chroot_list.

deWin 04-25-2004 11:40 AM

Thanks guys. I have Pure FTP.

@leckie: I don't mind all users having write access to other's folders because all users are myself, as long as there's no security issue it's fine.

Should I look for the same info in pureftpconf file?

leckie 04-25-2004 08:16 PM

well if that is the case then that should be simple enough, change all the relevant users to be owned by the group usermain and then set all permissions of these folders to 771.

there is no security risk, as long as root is trusted which most likely he is you so there is no issue.

deWin 04-26-2004 01:45 AM

how do i change the users to be owned by the group? and what group would that be?


All times are GMT -5. The time now is 07:30 PM.