Solved

Unix Folder Permission

Posted on 2008-10-02
8
1,734 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 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