Solved

Unix Folder Permission

Posted on 2008-10-02
8
1,727 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
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Server TSQL script 11 24
Linux patching 4 61
Best Linux Distro for this software 10 58
iptables ubuntu BLOCK all 2 76
Samba is the de-facto standard program (or, more correctly: suite of programs) that UNIX and Linux systems use to share files with Microsoft Windows (and more recently, Mac OS-X) systems. Currently, there are 2 common versions of Samba available,…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now