Solved

Unix Folder Permission

Posted on 2008-10-02
8
1,730 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
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Hello, As I have seen there a lot of requests regarding monitoring and reporting for exchange 2007 / 2010 / 2013 I have decided to post some thoughts together and link to articles that have helped me. Of course a lot of information you can get…
If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

792 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