Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th December 2010, 04:38 PM
dandi Offline
Registered User
 
Join Date: Dec 2010
Posts: 6
windows_xp_2003firefox
permissions vs group

Hi Everyone,

I have a problem with accessing directory by the user that has a full access to this directory. So here is my setup:
there are two regular users: dkitel and cosiek and group called local.
cosiek wants to share /home/cosiek/1 directory to dkitel giving full access to local group(group that dkitel belongs to)
------
from cosiek standpoint it looks like this:
------------------------

[cosiek@plk-dkitel-fedora-01 ~]$ ls -l /home/
total 28
drwxrwx---. 6 cosiek local 4096 2010-11-28 04:42 cosiek
drwx------. 36 dkitel dkitel 4096 2010-11-28 04:23 dkitel
drwxrwx---. 6 gucio gucio 4096 2010-11-28 04:30 gucio
drwx------. 2 root root 16384 2010-10-05 00:21 lost+found
[cosiek@plk-dkitel-fedora-01 ~]$ ls -l /home/cosiek
total 8
drwxrwx---. 3 cosiek local 4096 2010-11-28 04:42 1
drwxrwxr-x. 2 cosiek cosiek 4096 2010-11-28 04:42 2
[cosiek@plk-dkitel-fedora-01 ~]$ ls -l /home/cosiek/1/
total 4
drwxrwx---. 2 cosiek local 4096 2010-11-28 04:42 1.1
[cosiek@plk-dkitel-fedora-01 ~]$



------
from dkitel standpoint it looks like this:

[dkitel@plk-dkitel-fedora-01 home]$ cat /etc/group | grep local
local:x:503:dkitel,gucio
[dkitel@plk-dkitel-fedora-01 home]$ groups dkitel
dkitel : gucio dkitel local
[dkitel@plk-dkitel-fedora-01 home]$ cd /home/cosiek/1
bash: cd: /home/cosiek/1: Permission denied
[dkitel@plk-dkitel-fedora-01 home]$ ls -l /home/cosiek/
ls: cannot open directory /home/cosiek/: Permission denied
[dkitel@plk-dkitel-fedora-01 home]$

--------------------------
and now my question: why dkitel does not have access to /home/cosiek/ ?
dkitel belongs to local group and /home/cosiek directory is fully accessible for local group

Thank you,
Daniel

Last edited by dandi; 12th December 2010 at 04:43 PM.
Reply With Quote
  #2  
Old 13th December 2010, 09:55 PM
assen Offline
Registered User
 
Join Date: Oct 2008
Posts: 492
linuxfedorafirefox
Re: permissions vs group

Hi,

dkitel needs to log out and log in again before his new group comes info effect.

Also, is SELinux on?

WWell,
Reply With Quote
  #3  
Old 14th December 2010, 12:27 AM
amturnip Offline
Registered User
 
Join Date: Jul 2007
Posts: 126
macoschrome
Re: permissions vs group

Troubleshooting could start with seeing whether dkitel can:

ls /
ls /home
Reply With Quote
  #4  
Old 14th December 2010, 06:51 PM
Fenrin Offline
Registered User
 
Join Date: Apr 2010
Location: Earth
Posts: 857
linuxfedorafirefox
Re: permissions vs group

Hello,

here is a solution:
Code:
su
chmod -R g+rw /home/cosiek/
To explain this command: -R changes the permission of the whole directory including every contained file; g=group, + adds permission, r=read, w=write.


In case if local group was not the owner of /home/cosiek, also do this:
Code:
chown -R :local /home/cosiek/
chwon changes the ownership of files. Syntax is as follows chown user:group files.
Reply With Quote
  #5  
Old 14th December 2010, 07:07 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,103
linuxfedorafirefox
Re: permissions vs group

Quote:
Originally Posted by Fenrin View Post
Hello,

here is a solution:
Code:
su
chmod -R g+rw /home/cosiek/
To explain this command: -R changes the permission of the whole directory including every contained file; g=group, + adds permission, r=read, w=write.


In case if local group was not the owner of /home/cosiek, also do this:
Code:
chown -R :local /home/cosiek/
chwon changes the ownership of files. Syntax is as follows chown user:group files.
Only if you want to give everything to the group.

You need access to the home directory - which may not be
granting group access.

Now if cosiek does not want to share his home directory, then
you may have some problems. It is possible to give some
permissions to the group for the home directory:
r- grants read (you can list the contents)
w- grants write (you can create files)
x- grants the ability to search for a specific file, but not read
the directory for all files.

The minimum the cosiek home directory will need:

owner- rwx, group- x, world-none
The directory /home/cosiek/1, will need owner-rwx,
group-rwx, world-none.

This will allow any member of the group "local" the ability
to read/write/create files in the /home/cosiek/1 directory,
but they will NOT be able to see what other files are in
the /home/cosiek directory.
Reply With Quote
  #6  
Old 14th December 2010, 07:22 PM
Fenrin Offline
Registered User
 
Join Date: Apr 2010
Location: Earth
Posts: 857
linuxfedorafirefox
Re: permissions vs group

ok thanks jpollard for the corrections.

I also noticed just now (I tried something similiar on my computer) that with above command of my post the user dkitel could not access subfolders of /home/cosiek/. In nautilus it would show files below /home/cosiek but you could probably not access these files.

Last edited by Fenrin; 14th December 2010 at 07:28 PM.
Reply With Quote
  #7  
Old 14th December 2010, 09:16 PM
dandi Offline
Registered User
 
Join Date: Dec 2010
Posts: 6
linuxfedorafirefox
Re: permissions vs group

assen, thanks a lot !!! login out and login in helped indeed.

Quote:
Originally Posted by jpollard View Post
Only if you want to give everything to the group.
The minimum the cosiek home directory will need:

owner- rwx, group- x, world-none
The directory /home/cosiek/1, will need owner-rwx, group-rwx, world-none..
yes, I checked this and there must be x flag assiged to the local group for /home/cosiek directory at minimum to narrow down shared area (/home/cosiek/1 in this case) and to gain security.
that makes sense

thanks a lot guys !!!
Reply With Quote
Reply

Tags
group, permissions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing ownership group permissions failing changedtothis Using Fedora 22 13th March 2010 07:30 PM
problem with Group Permissions blckspder Servers & Networking 12 29th July 2008 03:23 PM
Samba group permissions... Dragnet Servers & Networking 5 23rd November 2006 07:17 PM
Need help with (samba) group permissions Brian W Servers & Networking 0 20th August 2005 12:33 AM


Current GMT-time: 13:42 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat