LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-10-2009, 03:50 AM   #1
Fracker
Member
 
Registered: Mar 2009
Posts: 77

Rep: Reputation: 0
Question [Confusion] File Security


Hi,

I have a confusion, let suppose there is a file, i want to give rwx rights to two users "User_A", & "User_B", "User_A" Belongs to "Group_A", & "User_B" Belongs to "Group_B". Now there are other users as well who belong to Group_A, & Group_B, how can it be done? Create another Group and set group rights? but i guess then if there are 1000s of files then i have to create that much groups?

Ps: I don't want file security management through GUI file manager.
 
Old 04-10-2009, 05:31 AM   #2
Vit77
Member
 
Registered: Jun 2008
Location: Toronto, Canada
Distribution: Mandriva, RHEL, Mageia, SuSE
Posts: 132

Rep: Reputation: 17
Hi Fracker,

If you want several users to have similar access rights to a file(s), there's a group is for. You're right.

So, you may have to create new group (say, GROUP2) and use find command to change all files in some specified dir to a new group.

Code:
find /path-to-your-files -group GROUP1 -exec chgrp GROUP2 {} \;
Is it possible to use this way with your files?
 
Old 04-11-2009, 12:45 AM   #3
Fracker
Member
 
Registered: Mar 2009
Posts: 77

Original Poster
Rep: Reputation: 0
@Vit77

I already mentioned this make no sense, let say i have file server, which contain 1000s files, and i have around 1000 users who access those files, some people want to give rights to some users some don't & even more complex scenario, some people want to give read access to one user, write access to other user, while no delete access. Like in windows it is not a big deal, but when i come to linux it become v hard to do so, yes i can use always some content management tools or so, but why can i do it in linux environment.
 
Old 04-11-2009, 01:59 AM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
I guess ACLs might help here.
There you can specify several users and/or groups to have access to a file, not just one each, as is the case without ACLs.

Let me give you an example.
Let's say I have a file called MyFile, which is stored in a publicly accessible location.
I want only to grant access to myself and one other user (let's call the user sue).
So what I can do here is simply run setfacl -m u:sue:rwx MyFile and in addition to myself sue now has full access to the file, but nobody else (given that the "regular" permissions are set accordingly).
 
Old 04-13-2009, 12:32 AM   #5
Fracker
Member
 
Registered: Mar 2009
Posts: 77

Original Poster
Rep: Reputation: 0
Thanks reptiler
 
Old 04-14-2009, 12:46 AM   #6
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
You're welcome.
 
  


Reply

Tags
file, security


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
security updates for mandriva 2008 "one" ends in more confusion bittersweet60 Mandriva 3 10-27-2008 11:30 AM
file size confusion !! livetoday Linux - Newbie 6 04-07-2008 08:53 AM
LXer: Confusion about alleged exploits for Linux security extensions Grsecurity-PaX LXer Syndicated Linux News 1 01-16-2007 09:43 AM
File System confusion hotrodowner Linux - Software 1 07-04-2002 09:23 PM
security confusion markbender Linux - Security 1 08-16-2001 03:44 PM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration