Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Security > Folder Permissions for Two Users

Forgot Password?
 Linux Security   Discussion about keeping your machines secure, and the crackers out.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 05-22-2009   #1 (permalink)
Just Joined!
 
Join Date: May 2009
Location: Illinois
Posts: 3
Folder Permissions for Two Users

I have a server running SLES 10.1 and using pure-ftpd. I need users to have access to specific folders. When the user connects via FTP to the server, they are placed in their specific folder. Below is the folder layout:

All user directories are located under one folder (Main)

Main

-Andrew
------Andrew's Stuff
-Thomas
-------Thomas' Stuff

Now, the issue I am having is that I need one user (lets call him Steve) to have access to all folders located in Main.

So when "Steve" connects to the server he is in the main directory. (Where the "Andrew" and "Thomas" directories are located. "Steve" needs full access [rwx] to everything under "Andrew" and "Thomas'" folders. While at the same time "Andrew" and "Thomas" connect into their respected directories and need full access to theirs only.

It seems that the way I have this setup "Steve" can only get into files he creates, or if the rights are changed "Thomas" and "Andrew" cannot.

I was never any good at setting rights. I would just use the root account, except that I am not going to be the one updating this server, therefore I need another account that is not quite root.

I have tried: chown Andrew:Andrew to the Andrew folder and then added Steve to the Andrew group, however this did not work.

Any suggestions? Much thanks!
zerowizard is offline  


Reply With Quote
Old 05-23-2009   #2 (permalink)
Linux User
 
Krendoshazin's Avatar
 
Join Date: Feb 2005
Location: London, England
Posts: 327
When you add Steve to the group Andrew you will need to logout and log Steve back in, this will allow the new changes to take effect. Don't forget to create a group for each user and make sure that the user directories are set to permission 775.
__________________
"The search for the MOT JUSTE is not a pedantic fad but a vital necessity. Words are our precision tools. Imprecision engenders ambiguity and hours are wasted in removing verbal misunderstandings before the argument of substance can begin."

Do the things you use not respect you, the user? Then it's defective by design, so make your voice heard.
Krendoshazin is offline   Reply With Quote
Old 05-26-2009   #3 (permalink)
Just Joined!
 
Join Date: May 2009
Location: Illinois
Posts: 3
Is there a way to allow any folder created by either user, Andrew or Steve, to be viewable by the other by default? It seems as if Steve creates a folder Andrew can't view, and vice versa. Seeing as this is for an ftp, this is not good.
zerowizard is offline   Reply With Quote
Old 05-26-2009   #4 (permalink)
Linux User
 
Krendoshazin's Avatar
 
Join Date: Feb 2005
Location: London, England
Posts: 327
Yes there is. You'll want to to modify their ~/.bash_profile and ~/.bashrc files to include the line:
Code:
umask 007
, this will set the default permissions to 660 for files and 770 for folders. That means that the owner and group will have full read-write-execute permissions but anyone else will have none. If they use a different shell you can modify the config file - ~/.zshrc for example - the same way.
If you would like to set these as a global mask I believe you can do that in /etc/login.defs, search for UMASK and change the value from 022 to 007.
__________________
"The search for the MOT JUSTE is not a pedantic fad but a vital necessity. Words are our precision tools. Imprecision engenders ambiguity and hours are wasted in removing verbal misunderstandings before the argument of substance can begin."

Do the things you use not respect you, the user? Then it's defective by design, so make your voice heard.
Krendoshazin is offline   Reply With Quote
Old 05-26-2009   #5 (permalink)
Just Joined!
 
Join Date: May 2009
Location: Illinois
Posts: 3
Thank you so much. You have been extremely helpful!
zerowizard is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:32 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2