Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] umask
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Mon, 7 Mar 2005 20:14:07 +0000
  • Message-id: <200503072014.07939.andjoh@xxxxxxxxxx>
On Monday 07 March 2005 18:55, Hans du Plooy wrote:
> Hugo's question, and Patrick's answer (thanks) reminded me of something
> else I've been missing:
> How do I set the umask for a certain directory? Say I have a directory, a
> samba share, say, of which the linux directory is /data
> Now, lets suppose the samba/windows clients aren't the only people who put
> stuff in that directory, say I have a script that does backups or that
> downloads new versions of certain often used programs, that also goes
> there. Now I want everything in that directory to have permissions 444,
> regardless of who created and thus owns it.
> How do I do that on a per-directory basis, below samba?

I don't know if there is an easier way of doing it, but for detailed control
of permissions like you want, I would write a small program using fam, that
would monitor the directory and change permissions as required. I think I
posted a program here that did something similar a year or so ago.

< Previous Next >
Follow Ups