Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-10-2008, 11:42 PM   #1
LQ Newbie
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
File/Folder Sharing in unix for different users


I am new to the forum and even new to the Linux.

I have a question regarding file/folder sharing with different permissions for different users.

Consider i have a folder, i want to share it to 3 people with different permissions.

to one user i have given the permission as read only

to other two users i have given the permission as read write.

How can it be implemented at the linux file system side.

One more question how can i share a file/folder to other users in linux by using commands (i mean to say at the file system side?)

Please put some light on the same...
Old 09-10-2008, 11:57 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,628

Rep: Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149Reputation: 2149
Well, if you use the cmd

ls -l

you'll see something like

-rw-rw-r-- 1 chris chris 655 2008-09-11 12:29 t.t

the permissions are

- type, defaults to file, d=dir etc

rw- read/write,noexe for user (owner)
rw- read/write,noexe for group
r-- read,nowrite,noexe for others (world)

For you situation you could use those, adding the r/w user into the relevant group and ensure the read only user not in that group.

The relevant cmd is

which you can read about in the man pages

man chmod

but basically, its


chmod ugo=rw,rw,r filename

would set the above perms

To add a perm:
add exe to user's perms
chmod u+x filename

remove exe from user's perms

chmod u-x filename

Here's a good Linux tutorial:
See Chap 14 for Permissions

Last edited by chrism01; 09-10-2008 at 11:58 PM.


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
create a home network file sharing folder driftboy Linux - Newbie 1 11-19-2007 10:34 AM
Folder/File sharing and read/write access? JET-33 Linux - Server 2 04-04-2007 11:13 PM
Can someone help me get started uisng Unix file sharing? enigma_0Z Linux - Networking 3 05-31-2005 11:05 AM
howto folder/file sharing with specific groups kmhui Linux - Newbie 5 09-18-2004 07:05 PM
Win2k - Mandrake9.1 -file(folder) sharing? al3s Linux - Networking 3 04-19-2004 02:59 PM

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

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