Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2006 15:38:21 -0500
From:      Caleb Flynn <calebflynn@gmail.com>
To:        questions@freebsd.org
Subject:   File and folder permissions
Message-ID:  <451449BD.4000601@gmail.com>

next in thread | raw e-mail | index | archive | help
Hello list,

This has probably come up before, but I can't seem to find any entries 
for it. I'm helping a new public radio station to implement a shared 
music library via NFS (& Samba for 1 Windows box) on 6.1. The library 
needs to be accessible by everyone in the station, and we'd like 
volunteers to be able to write files to the library, but not delete 
them. Files will be organized into folders by artist first name: 
library/a/artist/album/track.ogg. I found this:

http://www.greenend.org.uk/rjk/2004/perms.html
Some platforms, e.g. FreeBSD, optionally take note of the setuid bit on 
a directory: any files or directories created in that directory use the 
directory's user ID as their user ID and new directories have the setuid 
bit turned on.

I've tried this approach and it does not seem to work, or maybe I'd 
doing something wrong. The setup is:
drwsrwxr-x   2 test2 wheel   512 Sep 22 02:16 test

When I create a file as another user i get this:
-rw-r--r--  1 test1  wheel    0 Sep 22 01:39 uid

When I create a directory:
drwxr-xr-x  2 test2   wheel  512 Sep 22 15:29 yo

The other problem is that if the folder is writable by the group then I 
can `rm -R test` and I can override the deletion for files inside the 
folder, but not the folder itself:
override rwxr-xr-x  test2/wheel for /test/yo? y

$ ls -l /test
total 0

Any thoughts or tips regarding the method I describe or another method 
that will be appreciated.

Thanks,
Caleb



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