-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/12/2019 01.42, David T-G wrote:
Carlos, et al --
...and then Carlos E. R. said... % % maybe (in sudoers): % % cer Telcontar = (root) /bin/bash \ % /data/storage_b/cer/./0_Change_PicturesPerms_via_sudo % % will be the easiest (then I don't need two scripts: one script calls % fixit.sh)
Yes, but get rid of the /bin/bash and just call the script, and you can get rid of the superfluous ./ in the middle as well.
That ./ is just a typo. Done.
% % I might try xargs in the script, it would run faster. With the caveat % that we are talking of about 15000 files with paths, more than fits % the line command buffer - unless xargs knows to split in several % lines. I don't remember if it does.
Yes, it does; that is its purpose.
Ok. How do I change: find /data/storage_b/cer/Pictures -type d \ -exec chgrp cer '{}' \; \ -exec chmod u+r+w+x,g+w+x,o-r-w-x,-t '{}' \; \ -exec setfacl -m g:users:rx '{}' \; \ -exec setfacl -m g:cer:rwx '{}' \; to using xargs? find /data/storage_b/cer/Pictures -type d -print0 | xargs -0 \ -exec chgrp cer '{}' \; \ -exec chmod u+r+w+x,g+w+x,o-r-w-x,-t '{}' \; \ -exec setfacl -m g:users:rx '{}' \; \ -exec setfacl -m g:cer:rwx '{}' \; That I know is wrong. I want xargs to call several commands and to place the file name at the correct place for each. I look at the few examples in the man page, and I only see how to call a single command. Of course I could call another script, but I do not want to keep two scripts. Can xargs call a function that only exists inside the script? I think not.
% % I just thought that sudoers did not allow scripts.
It does.
Next (as noted in your next email) you should put that script somewhere where only root can write it and take it away from yourself.
Ah, it is there because seeing it there is how I know it exists and the name. - -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXevA/wAKCRC1MxgcbY1H 1ZYUAJ9cHqfmAvRSXlnszE1Q8E5tVZsiQwCdHRTbpIJL+N6Q9upmwVL2a2GM5K4= =m2o4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org