Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unix Folder Permission

Posted on 2008-10-02
8
Medium Priority
?
1,740 Views
Last Modified: 2013-12-06
Hi guys, I'm a noob in unix. I have a Samba Server running on SME Server (Red Hat). I need to set a folder permission for 2 groups. 1 group need read-only permission while the other group requires read + write permission. The groups have been created with members added. What must I do next so that 1 group can have read-only permission while the other group have read-write permission, Thanks a million
0
Comment
Question by:totallypatrick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Expert Comment

by:michofreiha
ID: 22622672
read only:

chmod 644 folder_name

owner: read and write permissions,
group: only read permissions,
others: only read permissions.

read write permission:
chmod 664 folder_name

owner: read and write permissions,
group: read and write permissions,
others: only read permissions.

0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22622690
you may change the ownership of the dir, e.g.

chgrp group1 /path/to/dir

then change perms on the dir

chmod 775 /path/to/dir

the other group will have read only perms

Otherwise, use access control lists

Please see:

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-acls.html
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-acls-setting.html

you may follow the links within the above links for more details
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22622707
do not remove the execute perm from dir permissions since it means listing / searching perm.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:totallypatrick
ID: 22622719
Hi, I do understand this. But from what I understand owner is only 1 person which is usually the admin. Can I have more than 1 owner to a folder? I need to have 2 persons having read-write access and another 2 persons having only read access. Also does Samba have a part in the permisson? I have made some changes in the SME Server GUI on folder permission. It has actually changed the smb.conf file from the default of "create mode = 0660" to "create mode = 0640". What does this means?
0
 
LVL 9

Expert Comment

by:michofreiha
ID: 22622754
A folder can have one owner at a time...As omarfarid said, to have multiple owners you should assign a group that contains 2 owners with read-write access and all others give them only read access as I saind in my first submission...

660
Owner: read write
group: read write
Other: no access

640:
Owner: read write
group: read only
Other: no access
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22622771
what you want to do is doable using ACLs. You can not have two owners for a file or folder.
0
 

Author Comment

by:totallypatrick
ID: 22623062
Hi guys, thanks for helping. the permission on a folder is owner, group and others respective which means I cannot have 2 sets of permission for 2 different group right? For others, I do not even want to give a read permission. Just give read-write, read permission to the 2 groups thats all. In order to do this, I must use ACL ? How about Samba permission? Must I bother about Samba permission? I'm using a Samba server as a file server and certain permission can be set via Samba GUI but very limited. That's y I need to use command prompt. Clients will be on Windows XP
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 2000 total points
ID: 22623124
an owner is an individual user account and not a group. So, you can give this owner certain priv. and group another set of priv. ACLs are the way to give different perms / priv to different users and different groups. I am not familiar with samba priv and how they intersect with unix priv. Please see:

http://us1.samba.org/samba/docs/using_samba/toc.html
http://us1.samba.org/samba/docs/using_samba/ch09.html
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

715 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