zoltans at geograph.co.za
Mon Sep 11 14:53:23 UTC 2006
Alan McKinnon wrote:
> That's cool, but you didn't answer two of my questions. We both
> know how umask is supposed to work, what we don't know is why
> it isn't doing that on your machine.
> Which 4 numbers are printed to the console when you run
> the 'umask' command in a shell? And what are the mount options
/dev/sda4 /home ext3 defaults 0 2
> and fs type of the filesystem in question? If you touch a new
> file there, what permissions does it have - are they set right
zls at gl0:~$ touch zzzx ; ls -la zzzx
-rw-rw-r-- 1 zls mapping 0 2006-09-11 16:41 zzzx
zls at gl0:~$
> at first, then something else changes them after two seconds
nope - stays like that.
aaaargh!!! - it stays like that when I cp the zzzx file to the "other"
I think I should now get back to the software developers to see if
they've messed up something (in this current version) in the get/put
routine. (it used to work, but I haven't used the facility since
installing dapper and the new version of their software !!)
(this is going to end red-faced :-/ )
> If all else fails:
> Step 1 is to realise that what you want is completely contrary
> to the design of the ext2/3 & reiser filesystems - these put
> responsibility for settings permissions totally under the
> user's control, so there isn't a way to ensure that a certain
> permission will be set.
true - but then where does the user set these defaults (so that I can
reliably change all users to have the default that I want, regardless of
how they logon to the system? (umask seems unreliable)
> Then, 775 seems odd - are these all executable files? There is
> no way I know of the create a new file and have any of the
> execute bits set. The kernel applies a hard coded MODE of 0666
> to new files, modified by the umask. To set x, one has to run
> chmod. But no matter, this doesn't change the principle
fair comment - 664 is what is really needed, but in a separate
subdirectory there are common scripts, so I just willy-nilly set 775.
> I assume you want the files to start with 775 and to never
> change to something else. I can think of a few workarounds:
> 1. Use the affs or adfs file system types, these have a mode
> option per the man page
mmmmm - got a few terrabytes of filesystems to change :-(
(although I could probably re-arrange where I store certain file types)
> 2. Hook into some daemon like fam and chmod all new or changed
> files as they are changed
> 3. Run 'find -perm -exec chmod' every few minutes in a cron
> 4. Run 'chmod -R 775 /path/to/dir/*' every minute
yep - but the files are returned/re-accessed at irregular (and sometimes
very short) intervals
> 5. Place the directory under discussion on a vfat file system.
> Mount it using an appropriate combination of exec, umask,
> fmask, dmask, uid and gid options. This satisfies local users.
> Share this dir using samba and enforce the permissions you
mmmmm samba was mooted as an option to get around this issue.....
> Hopefully one of these suits your needs.
>> Geograph (Pty) Ltd.
>> P.O. Box 31255, Tokai 7966, South Africa.
>> B3-106 Tokai Village, cnr Vans/Tokai Rds,
>> Tokai 7945, Western Cape, South Africa.
>> Tel: +27-21-7154329 Mobile: +27-83-6004028
>> Fax: +27-86-6115323
Geograph (Pty) Ltd.
P.O. Box 31255, Tokai 7966, South Africa.
B3-106 Tokai Village, cnr Vans/Tokai Rds,
Tokai 7945, Western Cape, South Africa.
Tel: +27-21-7154329 Mobile: +27-83-6004028
More information about the ubuntu-users