Sorry - I've done some googling and testing. Although bind mount accepts a umask it doesn't apply it. To explain the concept here is an example of what I tried - the following does not work... # mount --bind -o umask=0 /tmp /mnt/tmp2/ # touch /mnt/tmp2/xyz # ls -l /mnt/tmp2/xyz -rw-r--r-- 1 root root 0 Feb 22 07:39 /mnt/tmp2/xyz Some file system types allow a umask to be specified, but not the standard ones (see man mount). So I don't think that will fly. I wouldn't consider using inotifywait - its formatting options for filenames with spaces in them is difficult for shell scripts to process. And even worse, it claims to have bugs that can lead it to miss changes. It's a bit disappointing - only a toy. It would be a cool project to create something better. So I think you are stuck with a looping shell script. If you're really keen it would be possible to write a umask virtual filesystem using Linux fuse - but I guess you don't want to do any C programming. If you do I can supply some pointers (I've written collectfs - a fuse folder protecting file system, it collects any file clobbered or deleted by any process). Interesting problem. On Wed, 22 Feb 2012 04:46:59 lynn wrote:
On 02/21/2012 11:53 AM, michael@actrix.gen.nz wrote:
I've read that it's possible to set a umask option for a bind mount, so would remounting the folder be an option? I haven't tried it myself - but it might be worth a shot.
On Tue, 21 Feb 2012 00:39:42 lynn wrote:
Hi openSUSE 12.1 umask 0022
In a shared folder, we want any file created to be group rw. Using acls is not an option.
... Mmm. I can only change the umask globally. Can it be done on a per folder basis? L x
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org