[Tfug] Setting [u|f]mask on a bind mount

Brian Murphy murphy+tfug at email.arizona.edu
Sat Sep 1 13:16:56 MST 2007


How about a fuse filter or overriding creat(2) and open(2) with
LD_PRELOAD?

Brian

Quoting Glen Pfeiffer <glen at thepfeiffers.net>:
> I asked on linux.debian.user also, and nobody responded to that
> post yet either. Does anybody here have a suggestion on how to
> accomplish what I want?
>
> Thanks!
>
> --
> Glen
>
>
> On 08/31/2007 03:15 PM, Glen Pfeiffer wrote:
>> I want to have a directory tree appear in several places, while
>> forcing certain permissions for created files to be 0660.
>>
>> I tried mounting a directory like so:
>>
>>   mount --bind -o umask=0117 /home/files /home/glen/files
>>
>> and
>>
>>   mount --bind -o fmask=0117 /home/files /home/glen/files
>>
>> But the above commands had no effect on permissions of created
>> files. Then I read the man page:
>>
>>   Note that the filesystem mount options will remain the same  as
>>   those on  the original mount point, and cannot be changed by
>>   passing the -o option along with --bind/--rbind.
>>
>> I take that to mean that I cannot change the umask when mounting
>> with --bind.
>>
>> Any ideas on how to achieve my goal?
>>
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org




The opinions or statements expressed herein are my own and should not be
taken as a position, opinion, or endorsement of the University of
Arizona.






More information about the tfug mailing list