LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Group permissions for ftp users (https://www.linuxquestions.org/questions/linux-newbie-8/group-permissions-for-ftp-users-887208/)

cbc 06-19-2011 04:00 PM

Group permissions for ftp users
 
Hi,

I need to assign permissions for ftp users. For that I need to create groups with different permissions like upload, download, rename, delete, rename and delete. And the users added to the group need to have that group permissions by default. Is this possible ? Plzz any one help on this..

Thanks,
Ram

jschiwal 06-19-2011 10:31 PM

The permissions would be read or write. The sticky bit on the directory would restrict deletions to the owner.

You need to indicate which ftp daemon you are using. Further option may depend on which ftp server package you installed. They have different configuration files.

If ftp users are also regular linux users, file system acls can also be used to add write permissions to other users.

cbc 06-19-2011 10:53 PM

I am using vsftpd on SLES 11.

I need to manage hundreds of user-accounts. So, I am thinking that by creating groups with specific permissions so that adding users to that specific group will solve the problem. But I am confused assigning permissions to these groups.

So, please help on this.

Thanks,

Ram

jschiwal 06-19-2011 11:18 PM

The setfacl command can be used to control file access for groups as well.

Code:

setfacl -m d:g:ftpw:rwx /srv/ftp/
setfacl -m  g:ftpw:rwx /srv/ftp/
setfacl -m d:g:ftpro:rx /srv/ftp/
setfacl -m  g:ftpro:rx /srv/ftp/

Here note two commands for each group. The first sets the default which will be inherited may new subdirctories in the future. The directory itself needs its own acl.

I'm on my tablet, in a restaurant, so I can't provide vsftpd options I can't look up. I'll leave it to you to read the vsftod.conf man page for other options. Maybe tuned to the operations in your first post.

cbc 06-19-2011 11:44 PM

Thanks a lot jschiwal. I think this would work for me. I really appreciate your help :)


Regards,
Ram

cbc 06-20-2011 08:11 PM

jschiwal, I have a quick question for you. So, I need to add users to the above created groups so they can get the group permissions by default right?

For ex:

useradd -g ftpw xxxx


All times are GMT -5. The time now is 05:39 PM.