Help setting proper permissions

From: Eric M. Jackson (Eric.Jackson_at_mcasolutions.com)
Date: 11/05/04


Date: Fri, 05 Nov 2004 13:25:53 -0600

I am having a bit of trouble getting the persmissions to work out as I
would like on a directory and its subdirectories.

Here is what I am going for

I have a directory /winshares/accounting

I have an accounting group setup on the server.

I have a samba share setup that only lets members of the accounting
group access it.

The problem is that within this folder I am hoping to make sure that no
matter who creates or edits a file or new directory that the permissions
remain:

-rwxrwx--- 1 user accounting 35328 Oct 18 2002 SECRET.XLS (for
files)

and

drwxrws--- 2 olgavera accounting 4096 Nov 4 16:58 SAMPLEDIR (for
directories)

The problem can best be describe as this, whenever a file is saved over
or created it gets the following permissions:

-rw-r--r-- 1 user accounting 0 Nov 5 13:15 test

This means "others" can see it and members of the accounting cannot edit
it. Right now I have a simple script that runs ever five minutes as
shown below, how can I get it so that these permissions (770 for
everything or better still 660 for files and 770 for dirs) are set at
the time when a file is saved or a new directory is created.

I am very confused about how umask works and if it can be set for a
specific directory and subdirectories.

Sample permissions fix script at present:

chown defaultuser:accounting /winshares/accounting -R
chmod 770 /winshares/accounting -R
chmod g+s /winshares/accounting -R

Thanks,
        Eric

PS - I win continue to look over various man pages and google to try to
correct this, but your advice would be helpful.



Relevant Pages

  • Re: chmod operation on directories / files
    ... If I use chmod -R 644 then it will go through all the subdirectories ... assigning everything 644 permissions, directories including. ...
    (freebsd-questions)
  • Re: Can I set permissions so that they propagate?
    ... knowledge what is a chmod. ... default permissions on files and subdirectories that are created in the ... So I'll read up on chmod and umask. ...
    (comp.os.linux.misc)
  • Re: chmod hidden files
    ... hidden and non-hidden) in a given directory, including all subdirectories ... Use whatever wild cards for file names you want selected ... chmod -R XXX * ... where XXX are the permissions. ...
    (alt.os.linux)
  • Re: MCSA/MCSE Self-training book from MS PRESS for exam 70-215 incorrect on file permission question
    ... >> NTFS permissions don't always trump share perms. ... >> - Accounting group has full control via NTFS and full control via the ... >>> AccountingDept folder. ...
    (microsoft.public.win2000.file_system)
  • Re: User Rights at Client Seem to Vary
    ... The accounting package is the reason for the switch to ... >>Thats a good idea. ... > Or just first VIEWING the permissions and perhaps ... > 'pass' both the Share AND the NTFS permissions on a file to ...
    (microsoft.public.windows.server.active_directory)