umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus
Nils Kassube
kassube at gmx.net
Tue Sep 14 21:53:35 UTC 2010
Derek Maciel wrote:
> So the script in your Tech folder could do:
> for file in *.*; do chown <some_user>:tech {file}; done
>
>
> This would change the owner of all the files in the current directory
> to <some_user> in the tech group.
Not exactly. You used "*.*" which would not apply to all files but only
to those with names with a "." except those which start with a ".". And
probably you wanted to write "$file" instead of "{file}". I think it
would be easier to use the chown -R option for the current folder and it
would really change all files, even recursively.
> I'm just not sure what I should use for <some_user>.
You could simply omit it - then the command would only change the group.
That would make the command:
chown -R :tech .
And it would also avoid the problem of having possibly too many file
names.
Nils
More information about the ubuntu-users
mailing list