Solved

Unix Folder Permission

Posted on 2008-10-02
8
1,728 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

21 Experts available now in Live!

Get 1:1 Help Now