Hello:

Simanta Jyoti Handique wrote,
> I'm trying to setup directories in my linux box for a project. Each of
> the project memebers have a directory to themselves for development
> purposes.  There are managers who can wtite into any developers
> directories.  What can I do to ensure that even if a manager writes a
> file into someone else's directory, the owner of that file would still
> be the owner of the directory, the file would always belong to a
> particular group and the permissions would always be 775. Do i need to
> use some settings in Samba to enforce this?

This can be controlled via Samba's "inherit permissions" and "force
create mode" on a per share basis.

1) Set the ownership on project root 

# chown user.group /project

2) Set the user and group permissions on /project. Enable the "sticky"
bit and "setgid" on the directory so that only the owner of the file is
allowed to delete it. Setgid on the directory ensures that all files
created under /project will have the group set to "group"

# chmod 3775 /project

3) Configure the [project] share in smb.conf  to "inherit" the directory
permissions of the parent directory and apply them on all files created
under this share. Force the file creation mode to "0755"

[projects]
        path = /project
        [..]
        inherit permissions = yes
        force create mode = 0755

Let us know if this worked! See "man smb.conf" for other ways of
enforcing group and user permissions.

-- Shanu

-- 
Officer:
        We've analyzed their attack, sir, and there is a danger.
        Should I have your ship standing by?
Governor Tarkin:
        Evacuate? In our moment of triumph? I think you
        overestimate their chances.

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to