Solved

Linux Folder Rights for Multi Users via FTP

Posted on 2006-06-28
10
510 Views
Last Modified: 2013-12-16
Linux Folder Rights for Multi Users via FTP

Here is what  I am looking to do.

Folders:
System Files
-----Web Users
---------User1
---------User2
---------User3

I have users 1-3 able to connect and open their own folders and files, that works.
I want is a User4 that will have access to the folder Web Users and able to view and edit all files.

#ls -ld /var/www/vhosts/tmispa.com/web_users
drwxr-xr-x  5 root psaserv 1024 Jun 28 13:00 /var/www/vhosts/tmispa.com/web_users
#

# ls -l /var/www/vhosts/tmispa.com/web_users
total 3
drwxr-x---  2 bradt   psaserv 1024 Jun 28 13:00 bradt
drwxr-x---  2 gcsuser psaserv 1024 Jun 28 12:45 gcsuser
drwxr-x---  2 scpuser psaserv 1024 Jun 28 13:00 scpuser

passwd (file)
gcsuser:x:10007:10001::/var/www/vhosts/tmispa.com/web_users/gcsuser:/bin/false
scpuser:x:10005:10001::/var/www/vhosts/tmispa.com/web_users/scpuser:/bin/false
bradt:x:10006:10001::/var/www/vhosts/tmispa.com/web_users:/bin/false
0
Comment
Question by:kwitcom
  • 5
  • 4
10 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 17004596
In order to do that, user1,user2,user3 need to be members of their own group.

Their folders need to be owned by user1, user2, and user3, but as in the above be part of group psaserv. You can then as a member of the psaserv group read files in all files that are readable by group psaserv.

So in the above case for each of the home folders above you need to:

chmod -R g+rwx /home/folder

http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html

provides a more detailed overview.

(   (()
(`-' _\
 ''  ''

0
 
LVL 24

Expert Comment

by:slyong
ID: 17006494
It seems like you are using Plesk for creating the WebUsers.. not a good idea to mess with the permission of the directories.  I don't think Plesk has a way for what you need.
0
 

Author Comment

by:kwitcom
ID: 17009442
How do you set a group for directories?  Been trying to find the command.
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 22

Expert Comment

by:pjedmond
ID: 17010397
chgrp

man chgrp

for options, although they conform to much the same as for user.

NOTE psaserv group is the group that administers on behalf of plesk. Changing the group will make the Plesk Control panel fail if you try to do any administration relating to the ftp elements of these accounts. Make sure that you understand exactly what you aer doing before you commit!

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:kwitcom
ID: 17010561
Thnx... Now Will it like windows allow multi groups?

So I can just add a another group with Full access.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17010824
No - it only allows one group, but users can be members of multiple groups.

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:kwitcom
ID: 17012151
One last Question I think i Have it working now.... How do i remove a group from a user?

I have Bradt in tmigroup and psaserv.  But I want to remove the psaserv from him now to test it.

I have the Web_users folder with the group of tmigroup and all sub folders.  I added that group to my Admin account so it can access the folders also.

Folders:
                                        Group Asigned
System Files                        (root)
-----Web Users                    (tmigroup)
---------User1                      (tmigroup)
---------User2                      (tmigroup)
---------User3                      (tmigroup)
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17012383
>I think i Have it working now

Congratulations!

Easy way:

edit the /etc/group file and remove them from the group definition that you no longer wish them to be part of .

Slightly longer way - can't remember the name of the command - mess around with google for a bit - check the man statement, and then realie the command is....usermod....man it, mess it up a couple of times - decide to go with the easy way;)

Of course you can use usermod if you wish:)

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:kwitcom
ID: 17012456
what is the command for usermod?
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17012743
man usermod

usermod Bradt -g tmigroup
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
High Bandwidth Usage 6 93
Rate limit for DNS queries 7 91
ifconfig 4 90
What is linux 4.8.22? Is it the same as ubuntu 16.10 ?? 2 70
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question