setting perm to files with a patern in the file hame

Cameron Simpson cs at zip.com.au
Fri Feb 12 23:56:20 UTC 2010


On 12Feb2010 08:57, ESGLinux <esggrupos at gmail.com> wrote:
| Thanks for your answer

No worries. Please don't top post; it is harder to read things as a
conversation.

| your solution is not valid for me because there is a time (before de cron
| runs) that the file has wrong permission and it could be potentially
| accesible by not autorized users.

Might I suggest something else then? Gateway directories.

Instead of doing this by filename, make directories in your naming
scheme and lock down _their_ permissions. For example:

  mkdir just_group1
  chgrp group1 just_group1
  chmod 770 just_group1

Now, provided a user's working directory is _outside_ just_group1,
only users in group1 can get at the files inside, regardless of the
state of the file permissions.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

They said it couldn't be done/they said nobody could do it/
But he tried the thing that couldn't be done!/He tried - and he couldn't do it.




More information about the redhat-list mailing list