umask, ACL inheritance and setgid +s not working with copy from flash drive in nautilus

Rashkae ubuntu at tigershaunt.com
Wed Sep 15 02:02:05 UTC 2010


Nils Kassube wrote:
> 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.
> 



If you did have to go to scripting to fix the file permissions in this 
case, changing the ownership is not really what you want.  The problem 
is the posix permissions, which work as a mask over ACL.




More information about the ubuntu-users mailing list