Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2009 09:21:54 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        James Phillips <anti_spam256@yahoo.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Do permissions take time to take effect?
Message-ID:  <20091118152153.GB89004@dan.emsphone.com>
In-Reply-To: <727196.65984.qm@web65510.mail.ac4.yahoo.com>
References:  <727196.65984.qm@web65510.mail.ac4.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 17), James Phillips said:
> I wanted to create a shared directory writable by all users. When it
> initially failed, I assumed there may be a blanket ban on writing to
> directories owned by root.  Today, I was able to write to the root-owned
> "Share" directory.  However, when I re-created the directory owned by a
> special-purpose "Share" user, I ran into the same problem again.
> 
> $ cd
> $ pwd
> /home/james
> $ cd /home/Share
> $ ls -la
> total 4
> drwxrwxr-x  2 root  users  512 Nov 14 09:39 .
> drwxr-xr-x  5 root  wheel  512 Nov 14 09:39 ..
> $ grep users /etc/group
> users:*:100:james,backup
> $ cat > test.txt
> What? now it worked?

You are probably in the "users" group.  Running either the "groups" or "id"
command will say for sure.

> $ ls
> test.txt
> $ rm test.txt
> 
> ***After creating a special "Share" user***
> 
> $ cd /home/Share
> $ ls -la
> total 4
> drwxrwxr-x  2 Share  Share  512 Nov 17 21:04 .
> drwxr-xr-x  5 root   wheel  512 Nov 17 21:04 ..
> $ cat > test.txt
> cannot create test.txt: Permission denied
> $ grep Share /etc/group
> Share:*:1003:james,backup
> $

If you are currently either the "james" or "backup" user, and added the
Share group membership on another tty, then you may need to log out and back
in for the system to assign your new group membership to your session. 
Filesystem permissions take effect immediately, but group memberships are
assigned once, at login.
 
-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091118152153.GB89004>