[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: permissions - is this the best approach?



Johannes Wiedersich wrote:
On Thu, 2006-01-19 at 01:38 -0500, Chinook wrote:

I've set up a Linux and Mac zeroconf (netatalk) LAN. On the Linux box (Debian Etch) I have a shared directory for passing files to/from the Linux box, that is accessed from the Mac (while AppleTalk/zeroconf allows a peer-to-peer network model, netatalk only provides for a Mac to "see" a Linux system but the Linux system can't "see" a Mac for file sharing).

As root on the Linux box I created a new user "lanshare" accepting standard permissions for the /home/lanshare directory
owner: rwx group: r-x others: r-x
I also added to the "lanshare" group the other Linux users that I want to be able to use a shared directory.

Then I logged in as "lanshare" and created the folder "public" in /home/lanshare/. For this "public" folder I modified the permissions to
owner: rwx group: rwx others: ---
and I set the sticky bit.

The idea is to allow various users on the Linux box the ability to create and delete their own files in /home/lanshare/public and to read/copy any files therein. The Mac will create and delete files therein as the user "lanshare."

This seems to work as intended, but I'm wondering if such is the best way to handle the setup?

Thank you,
Lee C

Dexter wrote:
> In principe, it`s correct. Write permission and stiky bit on folder
> make, that everybody can create file in this directory, but only owner
> of the file can delete it.

IIRC, things may become messy, when users start to *copy* files to /home/lanshare/public. Then the sticky bit is not preserved; it works only for files *created* in that directory. It should be noted somewhere in the info pages.

The solution in our case was to export the mount with restrictions, ie.
/etc/exports on the computer with the 'public' fs has a line:

/home/lanshare/public 192.168.0.0/255.255.255.0(anonuid=503,anongid=100,all_squash,rw,sync)

just replace your network and the uid of user lanshare.

Hope that helps.

Johannes


Thanks Dexter and Johannes,

I appreciate the heads-up about the "copy" issue. It would certainly come up and I was not aware of it.

I'm not savvy enough to understand your solution though Johannes, so I guess I better do some more research there :-) That and the DHCAST128 UAM are the only issues I have left to resolve with my LAN, so I've made a lot of progress.

Thanks again,
Lee C



Reply to: